Ignore:
Timestamp:
2017-05-13T01:35:21+02:00 (2 years ago)
Author:
Don-vip
Message:

fix #14784 - Main toolbar/side toolbar keep reappearing after using Tab

File:
1 edited

Legend:

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

    r11770 r12132  
    1818*/
    1919public class DialogsToggleAction extends ToggleAction {
     20
     21    private boolean toolbarPreviouslyVisible;
     22    private boolean sideToolbarPreviouslyVisible;
    2023
    2124    /**
     
    4649        if (Main.isDisplayingMapView()) {
    4750            boolean selected = isSelected();
     51            if (!selected) {
     52                toolbarPreviouslyVisible = Main.pref.getBoolean("toolbar.visible", true);
     53                sideToolbarPreviouslyVisible = Main.pref.getBoolean("sidetoolbar.visible", true);
     54            }
    4855            Main.map.setDialogsPanelVisible(selected);
    4956            Main.map.statusLine.setVisible(selected || Main.pref.getBoolean("statusbar.always-visible", true));
    5057            Main.main.menu.setVisible(selected || Main.pref.getBoolean("menu.always-visible", true));
    5158            // Toolbars listen to preference changes, use it here
    52             if (!Main.pref.getBoolean("toolbar.always-visible", true)) {
     59            if (!Main.pref.getBoolean("toolbar.always-visible", true) && (!selected || toolbarPreviouslyVisible)) {
    5360                Main.pref.put("toolbar.visible", selected);
    5461            }
    55             if (!Main.pref.getBoolean("sidetoolbar.always-visible", true)) {
     62            if (!Main.pref.getBoolean("sidetoolbar.always-visible", true) && (!selected || sideToolbarPreviouslyVisible)) {
    5663                Main.pref.put("sidetoolbar.visible", selected);
    5764            }
Note: See TracChangeset for help on using the changeset viewer.