Changeset 14248 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityAction.java
- Timestamp:
- 2018-09-13T22:48:54+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityAction.java
r14153 r14248 35 35 36 36 import org.openstreetmap.josm.gui.MainApplication; 37 import org.openstreetmap.josm.gui.MainFrame; 37 38 import org.openstreetmap.josm.gui.SideButton; 38 39 import org.openstreetmap.josm.gui.dialogs.IEnabledStateUpdating; … … 113 114 updateValues(); 114 115 if (e.getSource() == sideButton) { 115 popup.show(sideButton, 0, sideButton.getHeight()); 116 if (sideButton.isShowing()) { 117 popup.show(sideButton, 0, sideButton.getHeight()); 118 } 116 119 } else { 117 120 // Action can be trigger either by opacity button or by popup menu (in case toggle buttons are hidden). 118 121 // In that case, show it in the middle of screen (because opacityButton is not visible) 119 popup.show(MainApplication.getMainFrame(), 120 MainApplication.getMainFrame().getWidth() / 2, 121 (MainApplication.getMainFrame().getHeight() - popup.getHeight()) / 2); 122 MainFrame mainFrame = MainApplication.getMainFrame(); 123 if (mainFrame.isShowing()) { 124 popup.show(mainFrame, mainFrame.getWidth() / 2, (mainFrame.getHeight() - popup.getHeight()) / 2); 125 } 122 126 } 123 127 }
Note:
See TracChangeset
for help on using the changeset viewer.