diff options
| author | 2023-11-16 14:40:57 +0100 | |
|---|---|---|
| committer | 2023-11-16 14:40:57 +0100 | |
| commit | edeeb253c9143b3cf53311e1c156fb9f1b2fe4db (patch) | |
| tree | 40cbb06940ecf657f01bd9fb3628e62e4322d41d /enigma-swing/src/main/java/cuchaz | |
| parent | Fix importing mappings without field source descriptors (diff) | |
| download | enigma-fork-edeeb253c9143b3cf53311e1c156fb9f1b2fe4db.tar.gz enigma-fork-edeeb253c9143b3cf53311e1c156fb9f1b2fe4db.tar.xz enigma-fork-edeeb253c9143b3cf53311e1c156fb9f1b2fe4db.zip | |
Don't only write diffs when MIO writer was last used
Diffstat (limited to 'enigma-swing/src/main/java/cuchaz')
| -rw-r--r-- | enigma-swing/src/main/java/cuchaz/enigma/gui/GuiController.java | 3 |
1 files changed, 3 insertions, 0 deletions
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 6eab0f8..c579901 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/GuiController.java +++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/GuiController.java | |||
| @@ -29,6 +29,7 @@ import javax.swing.JOptionPane; | |||
| 29 | import javax.swing.SwingUtilities; | 29 | import javax.swing.SwingUtilities; |
| 30 | 30 | ||
| 31 | import com.google.common.collect.Lists; | 31 | import com.google.common.collect.Lists; |
| 32 | import org.jetbrains.annotations.ApiStatus; | ||
| 32 | 33 | ||
| 33 | import cuchaz.enigma.Enigma; | 34 | import cuchaz.enigma.Enigma; |
| 34 | import cuchaz.enigma.EnigmaProfile; | 35 | import cuchaz.enigma.EnigmaProfile; |
| @@ -139,6 +140,7 @@ public class GuiController implements ClientPacketHandler { | |||
| 139 | this.gui.onCloseJar(); | 140 | this.gui.onCloseJar(); |
| 140 | } | 141 | } |
| 141 | 142 | ||
| 143 | @ApiStatus.Internal | ||
| 142 | public CompletableFuture<Void> openMappings(MappingFormat format, Path path, boolean useMappingIo) { | 144 | public CompletableFuture<Void> openMappings(MappingFormat format, Path path, boolean useMappingIo) { |
| 143 | System.getProperties().setProperty("enigma.use_mappingio", useMappingIo ? "true" : "false"); | 145 | System.getProperties().setProperty("enigma.use_mappingio", useMappingIo ? "true" : "false"); |
| 144 | return openMappings(format, path); | 146 | return openMappings(format, path); |
| @@ -182,6 +184,7 @@ public class GuiController implements ClientPacketHandler { | |||
| 182 | return saveMappings(path, loadedMappingFormat); | 184 | return saveMappings(path, loadedMappingFormat); |
| 183 | } | 185 | } |
| 184 | 186 | ||
| 187 | @ApiStatus.Internal | ||
| 185 | public CompletableFuture<Void> saveMappings(Path path, MappingFormat format, boolean useMappingIo) { | 188 | public CompletableFuture<Void> saveMappings(Path path, MappingFormat format, boolean useMappingIo) { |
| 186 | System.getProperties().setProperty("enigma.use_mappingio", useMappingIo ? "true" : "false"); | 189 | System.getProperties().setProperty("enigma.use_mappingio", useMappingIo ? "true" : "false"); |
| 187 | return saveMappings(path, format); | 190 | return saveMappings(path, format); |