summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thog2016-08-24 09:16:22 +0200
committerGravatar Thog2016-08-24 09:16:22 +0200
commitcb697454604c0a0c053e3cf7a4f2d63c24ee6d68 (patch)
tree0959ab9b9e86237eafcb5d6f38ea0d4b961536a8
parentAdd mapping converter to command line system (diff)
downloadenigma-cb697454604c0a0c053e3cf7a4f2d63c24ee6d68.tar.gz
enigma-cb697454604c0a0c053e3cf7a4f2d63c24ee6d68.tar.xz
enigma-cb697454604c0a0c053e3cf7a4f2d63c24ee6d68.zip
Only use moveClassTree for ClassEntry (Fix #10)
-rw-r--r--src/main/java/cuchaz/enigma/gui/GuiController.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/cuchaz/enigma/gui/GuiController.java b/src/main/java/cuchaz/enigma/gui/GuiController.java
index d6c170bd..1deb7d2a 100644
--- a/src/main/java/cuchaz/enigma/gui/GuiController.java
+++ b/src/main/java/cuchaz/enigma/gui/GuiController.java
@@ -198,7 +198,7 @@ public class GuiController {
198 this.deobfuscator.rename(obfReference.getNameableEntry(), newName); 198 this.deobfuscator.rename(obfReference.getNameableEntry(), newName);
199 this.isDirty = true; 199 this.isDirty = true;
200 200
201 if (refreshClassTree) 201 if (refreshClassTree && deobfReference.entry instanceof ClassEntry)
202 this.gui.moveClassTree(deobfReference, newName); 202 this.gui.moveClassTree(deobfReference, newName);
203 refreshCurrentClass(obfReference); 203 refreshCurrentClass(obfReference);
204 204
@@ -208,7 +208,8 @@ public class GuiController {
208 EntryReference<Entry, Entry> obfReference = this.deobfuscator.obfuscateReference(deobfReference); 208 EntryReference<Entry, Entry> obfReference = this.deobfuscator.obfuscateReference(deobfReference);
209 this.deobfuscator.removeMapping(obfReference.getNameableEntry()); 209 this.deobfuscator.removeMapping(obfReference.getNameableEntry());
210 this.isDirty = true; 210 this.isDirty = true;
211 this.gui.moveClassTree(deobfReference, obfReference.entry.getName(), false, true); 211 if (deobfReference.entry instanceof ClassEntry)
212 this.gui.moveClassTree(deobfReference, obfReference.entry.getName(), false, true);
212 refreshCurrentClass(obfReference); 213 refreshCurrentClass(obfReference);
213 } 214 }
214 215
@@ -216,7 +217,8 @@ public class GuiController {
216 EntryReference<Entry, Entry> obfReference = this.deobfuscator.obfuscateReference(deobfReference); 217 EntryReference<Entry, Entry> obfReference = this.deobfuscator.obfuscateReference(deobfReference);
217 this.deobfuscator.markAsDeobfuscated(obfReference.getNameableEntry()); 218 this.deobfuscator.markAsDeobfuscated(obfReference.getNameableEntry());
218 this.isDirty = true; 219 this.isDirty = true;
219 this.gui.moveClassTree(deobfReference, obfReference.entry.getName(), true, false); 220 if (deobfReference.entry instanceof ClassEntry)
221 this.gui.moveClassTree(deobfReference, obfReference.entry.getName(), true, false);
220 refreshCurrentClass(obfReference); 222 refreshCurrentClass(obfReference);
221 } 223 }
222 224