diff options
| author | 2021-01-17 14:14:21 +0100 | |
|---|---|---|
| committer | 2021-01-17 14:14:21 +0100 | |
| commit | 76ce6e5c795d9ab5f5f7c7dd308715f8a16124f3 (patch) | |
| tree | 470620106085ba8ed5fe23532e1e728cfc1409c2 | |
| parent | Merge pull request #331 from YanisBft/structure-panel (diff) | |
| download | enigma-76ce6e5c795d9ab5f5f7c7dd308715f8a16124f3.tar.gz enigma-76ce6e5c795d9ab5f5f7c7dd308715f8a16124f3.tar.xz enigma-76ce6e5c795d9ab5f5f7c7dd308715f8a16124f3.zip | |
Attempt fixing rare CME when loading a jar while tabs are open
| -rw-r--r-- | build.gradle | 2 | ||||
| -rw-r--r-- | enigma-swing/src/main/java/cuchaz/enigma/gui/GuiController.java | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle index 8b0a2c50..639bc4b6 100644 --- a/build.gradle +++ b/build.gradle | |||
| @@ -24,7 +24,7 @@ subprojects { | |||
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | group = 'cuchaz' | 26 | group = 'cuchaz' |
| 27 | version = '0.22.0' | 27 | version = '0.22.1' |
| 28 | 28 | ||
| 29 | version = version + (System.getenv("GITHUB_ACTIONS") ? "" : "+local") | 29 | version = version + (System.getenv("GITHUB_ACTIONS") ? "" : "+local") |
| 30 | 30 | ||
diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/GuiController.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/GuiController.java index 5217b25c..6fc91ab7 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/GuiController.java +++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/GuiController.java | |||
| @@ -57,7 +57,10 @@ import cuchaz.enigma.translation.mapping.serde.MappingParseException; | |||
| 57 | import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; | 57 | import cuchaz.enigma.translation.mapping.serde.MappingSaveParameters; |
| 58 | import cuchaz.enigma.translation.mapping.tree.EntryTree; | 58 | import cuchaz.enigma.translation.mapping.tree.EntryTree; |
| 59 | import cuchaz.enigma.translation.mapping.tree.HashEntryTree; | 59 | import cuchaz.enigma.translation.mapping.tree.HashEntryTree; |
| 60 | import cuchaz.enigma.translation.representation.entry.*; | 60 | import cuchaz.enigma.translation.representation.entry.ClassEntry; |
| 61 | import cuchaz.enigma.translation.representation.entry.Entry; | ||
| 62 | import cuchaz.enigma.translation.representation.entry.FieldEntry; | ||
| 63 | import cuchaz.enigma.translation.representation.entry.MethodEntry; | ||
| 61 | import cuchaz.enigma.utils.I18n; | 64 | import cuchaz.enigma.utils.I18n; |
| 62 | import cuchaz.enigma.utils.Utils; | 65 | import cuchaz.enigma.utils.Utils; |
| 63 | import cuchaz.enigma.utils.validation.ValidationContext; | 66 | import cuchaz.enigma.utils.validation.ValidationContext; |
| @@ -97,8 +100,10 @@ public class GuiController implements ClientPacketHandler { | |||
| 97 | project = enigma.openJar(jarPath, new ClasspathClassProvider(), progress); | 100 | project = enigma.openJar(jarPath, new ClasspathClassProvider(), progress); |
| 98 | indexTreeBuilder = new IndexTreeBuilder(project.getJarIndex()); | 101 | indexTreeBuilder = new IndexTreeBuilder(project.getJarIndex()); |
| 99 | chp = new ClassHandleProvider(project, UiConfig.getDecompiler().service); | 102 | chp = new ClassHandleProvider(project, UiConfig.getDecompiler().service); |
| 100 | gui.onFinishOpenJar(jarPath.getFileName().toString()); | 103 | SwingUtilities.invokeLater(() -> { |
| 101 | refreshClasses(); | 104 | gui.onFinishOpenJar(jarPath.getFileName().toString()); |
| 105 | refreshClasses(); | ||
| 106 | }); | ||
| 102 | }); | 107 | }); |
| 103 | } | 108 | } |
| 104 | 109 | ||