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