Changeset 10851 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2016-08-19T01:27:44+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13380 - Create removeToggleDialog method in MapFrame

File:
1 edited

Legend:

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

    r10824 r10851  
    3333import javax.swing.JPopupMenu;
    3434import javax.swing.JSplitPane;
     35import javax.swing.JToggleButton;
    3536import javax.swing.JToolBar;
    3637import javax.swing.KeyStroke;
     
    381382    }
    382383
     384    /**
     385     * Call this to remove existing toggle dialog from the left button-list
     386     * @param dlg The toggle dialog. It must be already in the list.
     387     * @since 10851
     388     */
     389    public void removeToggleDialog(final ToggleDialog dlg) {
     390        final JToggleButton button = dlg.getButton();
     391        if (button != null) {
     392            allDialogButtons.remove(button);
     393            toolBarToggle.remove(button);
     394        }
     395        dialogsPanel.remove(dlg);
     396        allDialogs.remove(dlg);
     397    }
     398
    383399    public void addMapMode(IconToggleButton b) {
    384400        if (b.getAction() instanceof MapMode) {
Note: See TracChangeset for help on using the changeset viewer.