Changeset 15125 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2019-05-27T22:03:46+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r14928 r15125 68 68 import org.openstreetmap.josm.command.SequenceCommand; 69 69 import org.openstreetmap.josm.data.UndoRedoHandler; 70 import org.openstreetmap.josm.data.osm.DataSet; 70 71 import org.openstreetmap.josm.data.osm.OsmDataManager; 71 72 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 234 235 public void addTag() { 235 236 changedKey = null; 236 sel = OsmDataManager.getInstance().getInProgressSelection(); 237 if (sel == null || sel.isEmpty()) 238 return; 239 240 final AddTagsDialog addDialog = getAddTagsDialog(); 241 242 addDialog.showDialog(); 243 244 addDialog.destroyActions(); 245 if (addDialog.getValue() == 1) 246 addDialog.performTagAdding(); 247 else 248 addDialog.undoAllTagsAdding(); 237 DataSet activeDataSet = OsmDataManager.getInstance().getActiveDataSet(); 238 try { 239 activeDataSet.beginUpdate(); 240 sel = OsmDataManager.getInstance().getInProgressSelection(); 241 if (sel == null || sel.isEmpty()) 242 return; 243 244 final AddTagsDialog addDialog = getAddTagsDialog(); 245 246 addDialog.showDialog(); 247 248 addDialog.destroyActions(); 249 if (addDialog.getValue() == 1) 250 addDialog.performTagAdding(); 251 else 252 addDialog.undoAllTagsAdding(); 253 } finally { 254 activeDataSet.endUpdate(); 255 } 249 256 } 250 257
Note:
See TracChangeset
for help on using the changeset viewer.