]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scenegraph.profile/src/org/simantics/scenegraph/profile/common/ObserverGroupListener.java
Apply profile style only for added / removed items
[simantics/platform.git] / bundles / org.simantics.scenegraph.profile / src / org / simantics / scenegraph / profile / common / ObserverGroupListener.java
index 497b401a2a1d502ce00e352fe1301cef66c244ae..10e2abe67fb1f347ce8cc91dcf9553d9abc7c529 100644 (file)
@@ -44,7 +44,7 @@ public class ObserverGroupListener implements SetListener<Resource> {
     public void add(Resource item) {
         //System.out.println("Add to group(" + this + "): " + item);
         items.put(item, item);
-        observer.update();
+        observer.update(style, item);
     }
 
     @Override
@@ -52,7 +52,7 @@ public class ObserverGroupListener implements SetListener<Resource> {
 //        new Exception().printStackTrace();
         //System.out.println("Remove from group(" + this + "): " + item);
         items.remove(item);
-        observer.update();
+        observer.update(style, item);
     }
 
     @Override
@@ -66,7 +66,7 @@ public class ObserverGroupListener implements SetListener<Resource> {
             return true;
         else if (object == null)
             return false;
-        else if (ObserverGroupListener.class != object.getClass())
+        else if (getClass() != object.getClass())
             return false;
         ObserverGroupListener other = (ObserverGroupListener)object;
         return observer.equals(other.observer) && group.equals(other.group) && style.equals(other.style);