CID 1366848 1366849 and 1366850 fixed 76/18776/1
Clément DAVID [Thu, 8 Dec 2016 13:45:17 +0000 (14:45 +0100)]
Change-Id: Ie689f9717f110366ec1a9b622641fe3e3f476baf

scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/datatip/DatatipDisplayModeManager.java

index f11cbe6..3447ccb 100644 (file)
@@ -41,7 +41,7 @@ public class DatatipDisplayModeManager {
     List<Integer> clicked_datatips = new LinkedList<Integer>();
 
 
-    class Position {
+    static class Position {
         public double x;
         public double y;
         public Position(double x, double y) {
@@ -102,7 +102,7 @@ public class DatatipDisplayModeManager {
             case MOUSECLICK:
                 return clicked_datatips.contains(uid);
             case MOUSEOVER:
-                return (uid == hover);
+                return hover.equals(uid);
             default:
                 return true;
         }
@@ -125,7 +125,7 @@ public class DatatipDisplayModeManager {
     public void onMouseMove(int x, int y) {
         Integer datatip = get(x, y);
         if (datatip > 0) {
-            if (datatip != hover) {
+            if (!hover.equals(datatip)) {
                 hover = datatip;
                 //triger redreaw
                 GraphicController.getController().setProperty(datatip, __GO_DATA_MODEL__, 0);