- Timestamp:
- 2009-07-16T19:19:05+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs/relation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r1795 r1798 541 541 if(memberTableModel.getRowCount() == 0 && tagEditorModel.getKeys().isEmpty()) 542 542 return; 543 Relation clone = new Relation(getRelation());544 tagEditorModel.applyToPrimitive( clone);545 memberTableModel.applyToRelation( clone);546 Main.main.undoRedo.add(new AddCommand( clone));543 Relation newRelation = new Relation(); 544 tagEditorModel.applyToPrimitive(newRelation); 545 memberTableModel.applyToRelation(newRelation); 546 Main.main.undoRedo.add(new AddCommand(newRelation)); 547 547 DataSet.fireSelectionChanged(Main.ds.getSelected()); 548 548 } else if (! memberTableModel.hasSameMembersAs(getRelation()) || tagEditorModel.isDirty()) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
r1794 r1798 113 113 } 114 114 fireTableDataChanged(); 115 getSelectionModel(); 115 116 listSelectionModel.clearSelection(); 116 117 for (int row : selectedRows) { … … 133 134 } 134 135 fireTableDataChanged(); 136 getSelectionModel(); 135 137 listSelectionModel.clearSelection(); 136 138 for (int row : selectedRows) { … … 209 211 int row = members.indexOf(member); 210 212 if (row >= 0) { 213 getSelectionModel(); 211 214 listSelectionModel.addSelectionInterval(row,row); 212 215 min = Math.min(row, min); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
r1795 r1798 41 41 private Relation relation; 42 42 43 /** The version of the relation when editing is started. */ 43 /** 44 * The version of the relation when editing is started. This is 45 * null if a new relation is created. */ 44 46 private Relation relationSnapshot; 45 47 … … 102 104 ); 103 105 104 this.relationSnapshot = new Relation(relation);106 this.relationSnapshot = (relation == null) ? null : new Relation(relation); 105 107 this.relation = relation; 106 108 this.layer = layer;
Note:
See TracChangeset
for help on using the changeset viewer.