File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
src/main/java/org/asciidoc/intellij/ui Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ This document provides a high-level view of the changes introduced by release.
7
7
[[releasenotes]]
8
8
== Release notes
9
9
10
+ === 0.42.2
11
+
12
+ - Handling invalid editor states from preview releases (#1636)
13
+
10
14
=== 0.42.1
11
15
12
16
- Reworking the changes for EAP, restoring preview and menu bar functionality (#1636)
Original file line number Diff line number Diff line change 22
22
import org .asciidoc .intellij .toolbar .AsciiDocToolbarPanel ;
23
23
import org .jetbrains .annotations .NotNull ;
24
24
import org .jetbrains .annotations .Nullable ;
25
+ import org .jruby .util .ResourceException ;
25
26
26
27
import javax .swing .*;
27
28
import java .awt .*;
@@ -202,7 +203,12 @@ public void setState(@NotNull FileEditorState state) {
202
203
mySecondEditor .setState (compositeState .getSecondState ());
203
204
}
204
205
if (compositeState .getSplitLayout () != null ) {
205
- mySplitEditorLayout = SplitEditorLayout .valueOf (compositeState .getSplitLayout ());
206
+ try {
207
+ mySplitEditorLayout = SplitEditorLayout .valueOf (compositeState .getSplitLayout ());
208
+ } catch (IllegalArgumentException ignore ) {
209
+ // found an obsolete or old value, using the default value
210
+ mySplitEditorLayout = AsciiDocApplicationSettings .getInstance ().getAsciiDocPreviewSettings ().getSplitEditorLayout ();
211
+ }
206
212
invalidateLayout ();
207
213
}
208
214
}
You can’t perform that action at this time.
0 commit comments