diff options
| author | 2020-06-12 23:08:09 +0200 | |
|---|---|---|
| committer | 2020-06-12 23:08:09 +0200 | |
| commit | 142b463faaad94f9fe8e33fe753ae5845b975ac6 (patch) | |
| tree | b42792a8009fcb0010cec88c31031d455731b1fa /enigma-swing/src | |
| parent | Fix decompile command (#278) (diff) | |
| download | enigma-142b463faaad94f9fe8e33fe753ae5845b975ac6.tar.gz enigma-142b463faaad94f9fe8e33fe753ae5845b975ac6.tar.xz enigma-142b463faaad94f9fe8e33fe753ae5845b975ac6.zip | |
Fix "Mark as Deobfuscated" menu entry not working (#265)
Diffstat (limited to 'enigma-swing/src')
| -rw-r--r-- | enigma-swing/src/main/java/cuchaz/enigma/gui/Gui.java | 3 | ||||
| -rw-r--r-- | enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/Gui.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/Gui.java index 0b2de460..72ec9656 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/Gui.java +++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/Gui.java | |||
| @@ -646,9 +646,8 @@ public class Gui { | |||
| 646 | if (cursorReference == null) return; | 646 | if (cursorReference == null) return; |
| 647 | 647 | ||
| 648 | Entry<?> obfEntry = cursorReference.entry; | 648 | Entry<?> obfEntry = cursorReference.entry; |
| 649 | Entry<?> deobfEntry = controller.project.getMapper().deobfuscate(obfEntry); | ||
| 650 | 649 | ||
| 651 | if (!Objects.equals(obfEntry, deobfEntry)) { | 650 | if (controller.project.getMapper().hasDeobfMapping(obfEntry)) { |
| 652 | if (!validateImmediateAction(vc -> this.controller.removeMapping(vc, cursorReference))) return; | 651 | if (!validateImmediateAction(vc -> this.controller.removeMapping(vc, cursorReference))) return; |
| 653 | this.controller.sendPacket(new RemoveMappingC2SPacket(cursorReference.getNameableEntry())); | 652 | this.controller.sendPacket(new RemoveMappingC2SPacket(cursorReference.getNameableEntry())); |
| 654 | } else { | 653 | } else { |
diff --git a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java b/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java index f689a211..135a5291 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java +++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java | |||
| @@ -475,7 +475,7 @@ public class EditorPanel { | |||
| 475 | this.popupMenu.openNextMenu.setEnabled(this.controller.hasNextReference()); | 475 | this.popupMenu.openNextMenu.setEnabled(this.controller.hasNextReference()); |
| 476 | this.popupMenu.toggleMappingMenu.setEnabled(isRenamable); | 476 | this.popupMenu.toggleMappingMenu.setEnabled(isRenamable); |
| 477 | 477 | ||
| 478 | if (referenceEntry != null && referenceEntry.equals(this.controller.project.getMapper().deobfuscate(referenceEntry))) { | 478 | if (referenceEntry != null && this.controller.project.getMapper().hasDeobfMapping(referenceEntry)) { |
| 479 | this.popupMenu.toggleMappingMenu.setText(I18n.translate("popup_menu.reset_obfuscated")); | 479 | this.popupMenu.toggleMappingMenu.setText(I18n.translate("popup_menu.reset_obfuscated")); |
| 480 | } else { | 480 | } else { |
| 481 | this.popupMenu.toggleMappingMenu.setText(I18n.translate("popup_menu.mark_deobfuscated")); | 481 | this.popupMenu.toggleMappingMenu.setText(I18n.translate("popup_menu.mark_deobfuscated")); |