]> gerrit.simantics Code Review - simantics/interop.git/blobdiff - org.simantics.interop.update/src/org/simantics/interop/update/model/PropertyChange.java
Improve PropertyChange.equals for asserted properties.
[simantics/interop.git] / org.simantics.interop.update / src / org / simantics / interop / update / model / PropertyChange.java
index 5220736d4259f803da5ed032273c8e6f20d46a56..de28055996ef41f8c1ed7368fd5d6fffb6ccc651 100644 (file)
@@ -81,7 +81,15 @@ public class PropertyChange {
                if (obj.getClass() != this.getClass())
                        return false;
                PropertyChange c = (PropertyChange)obj;
-               return pair.equals(c.pair);
+               if (!leftSubject.equals(c.leftSubject))
+                       return false;
+               if (!rightSubject.equals(c.rightSubject))
+                       return false;
+               if (pair.first != null && pair.first.equals(c.pair.first))
+                       return true;
+               if (pair.second != null && pair.second.equals(c.pair.second))
+                       return true;
+               return false;
        }
        
        public void apply(WriteGraph graph) throws DatabaseException {