Take rounding field into account in equals and in hashCode
[simantics/platform.git] / bundles / org.simantics.diagram.connection / src / org / simantics / diagram / connection / rendering / BasicConnectionStyle.java
index 301cfdf092bdabb5ea368c763ada136908e196c6..2f218d8fab325c4c0f7e082a3f977a74fa798486 100644 (file)
@@ -218,6 +218,8 @@ public class BasicConnectionStyle implements ConnectionStyle, Serializable {
         result = prime * result + (int) (temp ^ (temp >>> 32));
         result = prime * result + ((lineColor == null) ? 0 : lineColor.hashCode());
         result = prime * result + ((lineStroke == null) ? 0 : lineStroke.hashCode());
+        temp = Double.doubleToLongBits(rounding);
+        result = prime * result + (int) (temp ^ (temp >>> 32));
         result = prime * result + ((routeLineStroke == null) ? 0 : routeLineStroke.hashCode());
         return result;
     }
@@ -250,6 +252,8 @@ public class BasicConnectionStyle implements ConnectionStyle, Serializable {
                 return false;
         } else if (!lineStroke.equals(other.lineStroke))
             return false;
+        if (Double.doubleToLongBits(rounding) != Double.doubleToLongBits(other.rounding))
+            return false;
         if (routeLineStroke == null) {
             if (other.routeLineStroke != null)
                 return false;