Ignore:
Timestamp:
2020-05-27T11:16:39+02:00 (4 years ago)
Author:
GerdP
Message:

see #19296: Actions should avoid to install listeners which are not needed

  • either don't call installAdapters() or overwrite listenToSelectionChange()
  • partly reverts previous changes so that installAdapters() is not overwritten

One has to be careful because installAdapters() also calls initEnabledState()

File:
1 edited

Legend:

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

    r16138 r16509  
    99import org.openstreetmap.josm.data.preferences.BooleanProperty;
    1010import org.openstreetmap.josm.gui.MainApplication;
     11import org.openstreetmap.josm.tools.ImageProvider;
    1112import org.openstreetmap.josm.tools.ListenerList;
    1213
     
    110111    public ExpertToggleAction() {
    111112        super(tr("Expert Mode"),
    112               "expert",
     113                new ImageProvider("expert").setOptional(true),
    113114              tr("Enable/disable expert mode"),
    114115              null,
    115               false /* register toolbar */
     116              false /* register toolbar */, null, false
    116117        );
    117118        setToolbarId("expertmode");
Note: See TracChangeset for help on using the changeset viewer.