Changeset 9446 in josm for trunk/src/org


Ignore:
Timestamp:
2016-01-14T18:18:19+01:00 (9 years ago)
Author:
simon04
Message:

see #12335 - Make "Orthogonalize Shape" enabled state consistent w/ other actions (patch by kolesar)

File:
1 edited

Legend:

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

    r9230 r9446  
    599599    }
    600600
    601     /**
    602      * Don't check, if the current selection is suited for orthogonalization.
    603      * Instead, show a usage dialog, that explains, why it cannot be done.
    604      */
    605601    @Override
    606602    protected void updateEnabledState() {
    607         setEnabled(getCurrentDataSet() != null);
     603        setEnabled(getCurrentDataSet() != null && !getCurrentDataSet().getSelected().isEmpty());
     604    }
     605
     606    @Override
     607    protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
     608        setEnabled(selection != null && !selection.isEmpty());
    608609    }
    609610}
Note: See TracChangeset for help on using the changeset viewer.