From 1a08b8abf721d375db83cec78e2f520a802ab1e4 Mon Sep 17 00:00:00 2001 From: 2xsaiko Date: Mon, 6 Jul 2020 12:33:43 +0200 Subject: Fix "Mark as Deobfuscated" menu entry not working... this time without breaking all the things hopefully (#284) * Fix "Mark as Deobfuscated" menu entry not working... this time hopefully without breaking all the things * Use ungrouped() for MappingDelta * Fix *DefEntry overriding the wrong translate() version--- enigma-swing/src/main/java/cuchaz/enigma/gui/Gui.java | 2 +- enigma-swing/src/main/java/cuchaz/enigma/gui/panels/EditorPanel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'enigma-swing/src') 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 72ec9656..ec68d0df 100644 --- a/enigma-swing/src/main/java/cuchaz/enigma/gui/Gui.java +++ b/enigma-swing/src/main/java/cuchaz/enigma/gui/Gui.java @@ -647,7 +647,7 @@ public class Gui { Entry obfEntry = cursorReference.entry; - if (controller.project.getMapper().hasDeobfMapping(obfEntry)) { + if (controller.project.getMapper().extendedDeobfuscate(obfEntry).isDeobfuscated()) { if (!validateImmediateAction(vc -> this.controller.removeMapping(vc, cursorReference))) return; this.controller.sendPacket(new RemoveMappingC2SPacket(cursorReference.getNameableEntry())); } 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 135a5291..1ba0bbb1 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 { this.popupMenu.openNextMenu.setEnabled(this.controller.hasNextReference()); this.popupMenu.toggleMappingMenu.setEnabled(isRenamable); - if (referenceEntry != null && this.controller.project.getMapper().hasDeobfMapping(referenceEntry)) { + if (referenceEntry != null && this.controller.project.getMapper().extendedDeobfuscate(referenceEntry).isDeobfuscated()) { this.popupMenu.toggleMappingMenu.setText(I18n.translate("popup_menu.reset_obfuscated")); } else { this.popupMenu.toggleMappingMenu.setText(I18n.translate("popup_menu.mark_deobfuscated")); -- cgit v1.2.3