Changeset 13134 in josm


Ignore:
Timestamp:
2017-11-19T23:26:00+01:00 (4 weeks ago)
Author:
Don-vip
Message:

fix #15568 - properly highlight menu items search results

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/MenuItemSearchDialog.java

    r13106 r13134  
    2727public final class MenuItemSearchDialog extends ExtendedDialog {
    2828
    29     private final Selector selector;
     29    private final MenuItemSelector selector;
    3030    private static final MenuItemSearchDialog INSTANCE = new MenuItemSearchDialog(MainApplication.getMenu());
    3131
    3232    private MenuItemSearchDialog(MainMenu menu) {
    3333        super(Main.parent, tr("Search menu items"), tr("Select"), tr("Cancel"));
    34         this.selector = new Selector(menu);
     34        this.selector = new MenuItemSelector(menu);
    3535        this.selector.setDblClickListener(e -> buttonAction(0, null));
    3636        setContent(selector, false);
     
    6363    }
    6464
    65     private static class Selector extends SearchTextResultListPanel<JMenuItem> {
     65    private static class MenuItemSelector extends SearchTextResultListPanel<JMenuItem> {
    6666
    6767        private final MainMenu menu;
    6868
    69         Selector(MainMenu menu) {
     69        MenuItemSelector(MainMenu menu) {
    7070            super();
    7171            this.menu = menu;
     
    103103                    .map(Shortcut::getKeyStroke)
    104104                    .ifPresent(item::setAccelerator);
     105            item.setArmed(isSelected);
    105106            if (isSelected) {
    106107                item.setBackground(list.getSelectionBackground());
Note: See TracChangeset for help on using the changeset viewer.