Changeset 741
- Timestamp:
- 01/23/14 09:38:55 (10 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/agents/HFormat.java
r427 r741 1 1 package org.expeditee.agents; 2 2 3 import java.util.ArrayList; 3 4 import java.util.Collection; 5 import java.util.List; 4 6 5 7 import org.expeditee.gui.Frame; 8 import org.expeditee.items.Item; 6 9 import org.expeditee.items.Text; 7 10 … … 25 28 return null; 26 29 30 List<Item> changedItems = new ArrayList<Item>(); 31 27 32 float anchorY = 0F; 28 33 float yThreshold = 0F; -
trunk/src/org/expeditee/items/Item.java
r737 r741 366 366 367 367 private Frame _parent = null; 368 private Frame _oldParent = null; 368 369 369 370 protected int _highlightThickness = 2; … … 1784 1785 1785 1786 public void setParent(Frame frame) { 1787 _oldParent = _parent; 1786 1788 _parent = frame; 1787 1789 … … 2164 2166 public void anchor() { 2165 2167 Frame current = getParentOrCurrentFrame(); 2166 setID(current.getNextItemID()); 2168 // only set the id if we've moved to a different frame, or if the frame already has an item with that id 2169 if(!current.equals(_oldParent) || current.getItemWithID(getID()) != null) { 2170 int id = _id; 2171 setID(current.getNextItemID()); 2172 // System.out.println(this + " - Set ID to " + _id + " (was " + id + ")"); 2173 } else { 2174 // System.out.println(this + " - Kept old ID of " + _id); 2175 } 2167 2176 setOffset(0, 0); 2168 2177 setParent(current);
Note:
See TracChangeset
for help on using the changeset viewer.