Skip to content

Commit 1295208

Browse files
committed
SwingConsolePane: avoid needless EDT queuing
When the window is already visible, let's not bother to queue up the window.setVisible(true) call.
1 parent b8cc273 commit 1295208

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/org/scijava/ui/swing/console/SwingConsolePane.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,12 @@ public void append(final OutputEvent event) {
110110

111111
@Override
112112
public void show() {
113-
if (window == null) return;
113+
if (window == null || window.isVisible()) return;
114114
threadService.queue(new Runnable() {
115115

116116
@Override
117117
public void run() {
118-
if (!window.isVisible()) {
119-
window.setVisible(true);
120-
}
118+
window.setVisible(true);
121119
}
122120
});
123121
}

0 commit comments

Comments
 (0)