Changeset 11116 in josm for trunk/src/org


Ignore:
Timestamp:
2016-10-11T19:27:12+02:00 (8 years ago)
Author:
simon04
Message:

fix #13766 - Disable the JosmAction Orthogonalize.Undo when nothing is selected (patch by floscher)

File:
1 edited

Legend:

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

    r10748 r11116  
    2626import org.openstreetmap.josm.command.SequenceCommand;
    2727import org.openstreetmap.josm.data.coor.EastNorth;
    28 import org.openstreetmap.josm.data.osm.DataSet;
    2928import org.openstreetmap.josm.data.osm.Node;
    3029import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    124123                        .show();
    125124            }
     125        }
     126
     127        @Override
     128        protected void updateEnabledState() {
     129            updateEnabledStateOnCurrentSelection();
     130        }
     131
     132        @Override
     133        protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
     134            setEnabled(selection != null && !selection.isEmpty());
    126135        }
    127136    }
     
    618627    @Override
    619628    protected void updateEnabledState() {
    620         DataSet ds = getLayerManager().getEditDataSet();
    621         setEnabled(ds != null && !ds.selectionEmpty());
     629        updateEnabledStateOnCurrentSelection();
    622630    }
    623631
Note: See TracChangeset for help on using the changeset viewer.