Changeset 1762 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
- Timestamp:
- 2009-07-11T09:32:42+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
r1710 r1762 16 16 public abstract class RelationEditor extends ExtendedDialog { 17 17 18 /** keeps track of open relation editors */ 19 static private RelationDialogManager relationDialogManager; 20 21 /** 22 * Replies the singleton {@see RelationDialogManager} 23 * 24 * @return the singleton {@see RelationDialogManager} 25 */ 26 static public RelationDialogManager getRelationDialogManager() { 27 if (relationDialogManager == null) { 28 relationDialogManager = new RelationDialogManager(); 29 } 30 return relationDialogManager; 31 } 32 18 33 public static ArrayList<Class<RelationEditor>> editors = new ArrayList<Class<RelationEditor>>(); 19 34 … … 22 37 * editing. 23 38 */ 24 pr otectedRelation relation;25 pr otectedRelation clone;39 private Relation relation; 40 private Relation clone; 26 41 27 42 /** … … 57 72 } 58 73 } 59 return new GenericRelationEditor(r, selectedMembers); 74 if (getRelationDialogManager().isOpenInEditor(r)) 75 return getRelationDialogManager().getEditorForRelation(r); 76 else { 77 RelationEditor editor = new GenericRelationEditor(r, selectedMembers); 78 getRelationDialogManager().register(r, editor); 79 return editor; 80 } 60 81 } 61 82 … … 84 105 } 85 106 } 107 108 protected Relation getRelation() { 109 return relation; 110 } 111 112 protected Relation getClone() { 113 return clone; 114 } 86 115 }
Note:
See TracChangeset
for help on using the changeset viewer.