do not allow to chage tag tree selection, when current tag is under editing

This commit is contained in:
2015-05-07 21:30:34 +02:00
parent 89f66fbcb2
commit 4a11e24805
9 changed files with 220 additions and 33 deletions
@@ -41,6 +41,7 @@ import com.jpexs.decompiler.flash.gui.MainPanel;
import com.jpexs.decompiler.flash.gui.SearchListener;
import com.jpexs.decompiler.flash.gui.SearchPanel;
import com.jpexs.decompiler.flash.gui.SearchResultsDialog;
import com.jpexs.decompiler.flash.gui.TagEditorPanel;
import com.jpexs.decompiler.flash.gui.View;
import com.jpexs.decompiler.flash.gui.abc.LineMarkedEditorPane;
import com.jpexs.decompiler.flash.gui.controls.JPersistentSplitPane;
@@ -83,13 +84,12 @@ import javax.swing.SwingConstants;
import javax.swing.event.CaretEvent;
import javax.swing.event.CaretListener;
import javax.swing.tree.TreePath;
import jsyntaxpane.DefaultSyntaxKit;
import jsyntaxpane.SyntaxDocument;
import jsyntaxpane.Token;
import jsyntaxpane.TokenType;
import jsyntaxpane.actions.ActionUtils;
public class ActionPanel extends JPanel implements SearchListener<ActionSearchResult> {
public class ActionPanel extends JPanel implements SearchListener<ActionSearchResult>, TagEditorPanel {
private MainPanel mainPanel;
@@ -479,7 +479,6 @@ public class ActionPanel extends JPanel implements SearchListener<ActionSearchRe
}
public ActionPanel(MainPanel mainPanel) {
DefaultSyntaxKit.initKit();
this.mainPanel = mainPanel;
editor = new LineMarkedEditorPane();
editor.setEditable(false);
@@ -868,4 +867,16 @@ public class ActionPanel extends JPanel implements SearchListener<ActionSearchRe
searchPanel.showQuickFindDialog(decompiledEditor);
});
}
@Override
public boolean tryAutoSave() {
// todo: implement
return false;
}
@Override
public boolean isEditing() {
return (saveButton.isVisible() && saveButton.isEnabled())
|| (saveDecompiledButton.isVisible() && saveDecompiledButton.isEnabled());
}
}