We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a29f91 commit 094754aCopy full SHA for 094754a
src/org/openstreetmap/josm/actions/FullscreenToggleAction.java
@@ -56,15 +56,25 @@ public void actionPerformed(ActionEvent e) {
56
toggleSelectedState(e);
57
Config.getPref().putBoolean("draw.fullscreen", isSelected());
58
notifySelectedState();
59
- setMode();
+ safeSetMode();
60
}
61
62
/**
63
* To call if this action must be initially run at JOSM startup.
64
*/
65
public void initial() {
66
if (isSelected()) {
67
68
+ }
69
70
+
71
+ protected void safeSetMode() {
72
+ try {
73
+ this.setMode();
74
+ } catch (Exception exception) {
75
+ // Something happened. Disable fullscreen.
76
+ Config.getPref().put("draw.fullscreen", null);
77
+ throw exception;
78
79
80
0 commit comments