You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Colladia/app/src/main/java/com/ia04nf28/colladia/model/Elements/Anchor.java
+24-17Lines changed: 24 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -141,20 +141,25 @@ public Anchor(String serializedAnchor, final ObservableMap<String, Element> list
141
141
}
142
142
143
143
if(!this.getIdParentLink().equals(NO_PARENT) && this.getPositionLink() != NONE && listElement.containsKey(this.getIdParentLink())){//it is an anchor fixed to an element that is referenced
if(this.getLink().getLink() == null || this.getLink().getLink() != this.getLink()){//condition fulfilled if the anchor referenced has to get a reference of this one
157
-
this.getLink().setLink(this.getLink());
160
+
this.getLink().setIdParentLink(getIdParent());
161
+
this.getLink().setPositionLink(getPosition());
162
+
this.getLink().setLink(this);
158
163
}
159
164
160
165
@@ -164,15 +169,9 @@ else if(this.getIdParentLink().equals(NO_PARENT) && this.getPositionLink() == NO
164
169
165
170
if(this.getLink() != null)
166
171
{
167
-
this.getLink().setPositionLink(NONE);
168
-
this.getLink().setIdParentLink(NO_PARENT);
169
-
this.getLink().setLink(null);
172
+
this.getLink().disconnect();
170
173
}
171
-
172
174
this.setLink(null);
173
-
/* if(jsonAnchor.has(JSON_LINK) && !jsonAnchor.getString(JSON_LINK).equals("")){//it is a mobile anchor that is referenced
0 commit comments