goto last method after saving p-code when outside trait method

Fixed: AS3 p-code/AS hilighting after p-code save
This commit is contained in:
Jindra Petřík
2021-03-05 21:22:55 +01:00
parent a4b2d2e31b
commit 509b08ac86
4 changed files with 23 additions and 2 deletions
@@ -313,7 +313,11 @@ public class DetailPanel extends JPanel implements TagEditorPanel {
@Override
public void run() {
decompiledTextArea.removeScriptListener(this);
decompiledTextArea.gotoTrait(lastTrait);
if (lastTrait == GraphTextWriter.TRAIT_UNKNOWN) {
decompiledTextArea.gotoLastMethod();
} else {
decompiledTextArea.gotoTrait(lastTrait);
}
setEditMode(false);
View.showMessageDialog(null, AppStrings.translate("message.trait.saved"), AppStrings.translate("dialog.message.title"), JOptionPane.INFORMATION_MESSAGE, Configuration.showTraitSavedMessage);
}