Graphics: plot3d not always correctly updated after colormap change (due to uid refac... 17/13117/2
Calixte DENIZET [Fri, 8 Nov 2013 13:45:02 +0000 (14:45 +0100)]
Change-Id: I347859a85f7e8c3789995dc861b87445bc5b02f6

scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/DrawerVisitor.java

index af75cc4..6cdfc59 100755 (executable)
@@ -893,12 +893,11 @@ public class DrawerVisitor implements Visitor, Drawer, GraphicView {
     }
 
     @Override
-    public void updateObject(Integer id, int property) {       
+    public void updateObject(Integer id, int property) {
         /*
          * Check if property is CHILDREN and if there is a new child I should care about
          */
-        if (property == GraphicObjectProperties.__GO_CHILDREN__)
-        {
+        if (property == GraphicObjectProperties.__GO_CHILDREN__) {
             if (id != figure.getIdentifier()) {
                 /* Ignore children that are not mine */
                 return;
@@ -917,7 +916,7 @@ public class DrawerVisitor implements Visitor, Drawer, GraphicView {
                     updatedOpenGLChildren.add(children[i]);
                 }
             }
-            if (currentOpenGLChildren.size() == updatedOpenGLChildren.size()){
+            if (currentOpenGLChildren.size() == updatedOpenGLChildren.size()) {
                 /* No change made on openGL children => nothing to do */
                 return;
             } else {
@@ -926,7 +925,7 @@ public class DrawerVisitor implements Visitor, Drawer, GraphicView {
         }
         try {
             if (needUpdate(id, property)) {
-                if (GraphicObjectProperties.__GO_COLORMAP__ == property && figure.getIdentifier() == id) {
+                if (GraphicObjectProperties.__GO_COLORMAP__ == property && figure.getIdentifier().equals(id)) {
                     labelManager.disposeAll();
                     dataManager.disposeAllColorBuffers();
                     dataManager.disposeAllTextureCoordinatesBuffers();
@@ -1053,7 +1052,7 @@ public class DrawerVisitor implements Visitor, Drawer, GraphicView {
     @Override
     public void deleteObject(Integer id) {
         openGLChildren.remove(id);
-        
+
         if (isImmediateDrawing(id)) {
             canvas.redraw();
         }