mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-03 06:25:37 +00:00
non editable editors fixed
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.jpexs.decompiler.flash.gui.abc;
|
||||
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import java.awt.event.KeyEvent;
|
||||
import javax.swing.JEditorPane;
|
||||
import javax.swing.text.Document;
|
||||
import jsyntaxpane.SyntaxDocument;
|
||||
@@ -51,6 +52,20 @@ public class UndoFixedEditorPane extends JEditorPane {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processKeyEvent(KeyEvent ke) {
|
||||
if (!isEditable()) {
|
||||
// disable Ctrl-E: delete line
|
||||
// and Ctrl-H: Search and replace
|
||||
if ((ke.getKeyCode() == KeyEvent.VK_E && ke.isControlDown()) ||
|
||||
(ke.getKeyCode() == KeyEvent.VK_H && ke.isControlDown())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
super.processKeyEvent(ke);
|
||||
}
|
||||
|
||||
public void clearUndos() {
|
||||
Document doc = getDocument();
|
||||
if (doc instanceof SyntaxDocument) {
|
||||
|
||||
Reference in New Issue
Block a user