Changeset 12064 in josm


Ignore:
Timestamp:
2017-05-05T16:16:37+02:00 (7 months ago)
Author:
michael2402
Message:

DrawAction: Fix ds.beginUpdate()/endUpdate() try/finally

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r11993 r12064  
    238238    private static void addRemoveSelection(DataSet ds, OsmPrimitive toAdd, OsmPrimitive toRemove) {
    239239        ds.beginUpdate(); // to prevent the selection listener to screw around with the state
    240         ds.addSelected(toAdd);
    241         ds.clearSelection(toRemove);
    242         ds.endUpdate();
     240        try {
     241            ds.addSelected(toAdd);
     242            ds.clearSelection(toRemove);
     243        } finally {
     244            ds.endUpdate();
     245        }
    243246    }
    244247
Note: See TracChangeset for help on using the changeset viewer.