Changeset 9445 in josm for trunk/src


Ignore:
Timestamp:
2016-01-14T18:12:13+01:00 (4 years ago)
Author:
simon04
Message:

see #12335 - Disable "Search for objects by preset" w/o edit layer (patch by kolesar)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSearchPrimitiveDialog.java

    r9422 r9445  
    3636         */
    3737        public Action() {
    38             super(tr("Search for objects by preset"), "dialogs/search", tr("Show preset search dialog"),
     38            super(tr("Search for objects by preset..."), "dialogs/search", tr("Show preset search dialog"),
    3939                    Shortcut.registerShortcut("preset:search-objects", tr("Search for objects by preset"), KeyEvent.VK_F3, Shortcut.SHIFT),
    4040                    false);
     
    4848                TaggingPresetSearchPrimitiveDialog.getInstance().showDialog();
    4949            }
     50        }
     51
     52        @Override
     53        protected void updateEnabledState() {
     54            setEnabled(getEditLayer() != null);
    5055        }
    5156    }
Note: See TracChangeset for help on using the changeset viewer.