Ignore:
Timestamp:
2020-01-06T22:23:57+01:00 (5 years ago)
Author:
Don-vip
Message:

see #18514 - disable Window menu when empty

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
3 edited

Legend:

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

    r13106 r15649  
    9595
    9696    /**
     97     * Determines if the given component tracks visibility changes.
     98     * @param c The component.
     99     * @return {@code true} if the given component tracks visibility changes
     100     * @since 15649
     101     */
     102    public static synchronized boolean hasVisibilitySwitcher(Component c) {
     103        if (c == null) return false;
     104        return visibilityToggleListeners.containsListener(c);
     105    }
     106
     107    /**
    97108     * Constructs a new {@code ExpertToggleAction}.
    98109     */
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r14960 r15649  
    6161import org.openstreetmap.josm.gui.MapViewState.MapViewPoint;
    6262import org.openstreetmap.josm.gui.NavigatableComponent;
     63import org.openstreetmap.josm.gui.WindowMenu;
    6364import org.openstreetmap.josm.gui.draw.MapPath2D;
    6465import org.openstreetmap.josm.gui.layer.Layer;
     
    194195            }
    195196        }
    196         return MainMenu.addWithCheckbox(MainApplication.getMenu().editMenu, snapChangeAction, MainMenu.WINDOW_MENU_GROUP.VOLATILE);
     197        return MainMenu.addWithCheckbox(MainApplication.getMenu().editMenu, snapChangeAction, WindowMenu.WINDOW_MENU_GROUP.VOLATILE);
    197198    }
    198199
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r15586 r15649  
    5151import org.openstreetmap.josm.gui.MapFrame;
    5252import org.openstreetmap.josm.gui.MapView;
     53import org.openstreetmap.josm.gui.WindowMenu;
    5354import org.openstreetmap.josm.gui.draw.MapViewPath;
    5455import org.openstreetmap.josm.gui.draw.SymbolShape;
     
    251252            }
    252253        }
    253         return MainMenu.addWithCheckbox(MainApplication.getMenu().editMenu, dualAlignChangeAction, MainMenu.WINDOW_MENU_GROUP.VOLATILE);
     254        return MainMenu.addWithCheckbox(MainApplication.getMenu().editMenu, dualAlignChangeAction, WindowMenu.WINDOW_MENU_GROUP.VOLATILE);
    254255    }
    255256
Note: See TracChangeset for help on using the changeset viewer.