disable editor when no source code is showing
This commit is contained in:
parent
e3a12703da
commit
173f512f6c
|
@ -256,7 +256,8 @@ public class CodeUI extends JPanel {
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
displayedFile = null;
|
displayedFile = null;
|
||||||
codeEditor.setText(null);
|
codeEditor.setText("[no source displayed]");
|
||||||
|
codeEditor.setEnabled(false);
|
||||||
codeEditorLines.clear();
|
codeEditorLines.clear();
|
||||||
displayLine(-1, markCurrent);
|
displayLine(-1, markCurrent);
|
||||||
}
|
}
|
||||||
|
@ -277,6 +278,7 @@ public class CodeUI extends JPanel {
|
||||||
displayNoCode(markCurrent);
|
displayNoCode(markCurrent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
codeEditor.setEnabled(true);
|
||||||
|
|
||||||
String[] lines = data.split("\n");
|
String[] lines = data.split("\n");
|
||||||
logger.info("Opening " + codeFile + " (" + lines.length + " lines)");
|
logger.info("Opening " + codeFile + " (" + lines.length + " lines)");
|
||||||
|
|
Loading…
Reference in a new issue