Skip to content

Commit 9d556e0

Browse files
committed
Merge pull request #9 from axtimwalde/master
SwingConsolePane: do not catch window focus in show if window is visible
2 parents ad58bd7 + 75b18ad commit 9d556e0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
* %%
88
* Redistribution and use in source and binary forms, with or without
99
* modification, are permitted provided that the following conditions are met:
10-
*
10+
*
1111
* 1. Redistributions of source code must retain the above copyright notice,
1212
* this list of conditions and the following disclaimer.
1313
* 2. Redistributions in binary form must reproduce the above copyright notice,
1414
* this list of conditions and the following disclaimer in the documentation
1515
* and/or other materials provided with the distribution.
16-
*
16+
*
1717
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1818
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1919
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -115,7 +115,8 @@ public void show() {
115115

116116
@Override
117117
public void run() {
118-
window.setVisible(true);
118+
if (!window.isVisible())
119+
window.setVisible(true);
119120
}
120121
});
121122
}

0 commit comments

Comments
 (0)