File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
src/main/java/org/scijava/ui/swing/search Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -231,24 +231,17 @@ private void run() {
231231
232232 private void reset () {
233233 assertDispatchThread ();
234- if (dialog != null ) {
234+ if (dialog == null ) loseFocus ();
235+ else {
235236 searchPanel = null ;
236237 dialog .dispose ();
237238 dialog = null ;
238- }else {
239- SwingUtilities .getWindowAncestor (this ).requestFocusInWindow ();
240- }
241- if (!getText ().isEmpty ()) setText ("" );
242- else {
243- // lose the focus!
244- loseFocus ();
245- // Toolbar.getInstance().requestFocus();
246239 }
240+ setText ("" );
247241 }
248242
249243 private void loseFocus () {
250- assertDispatchThread ();
251- // NB: Default action: do nothing.
244+ SwingUtilities .getWindowAncestor (this ).requestFocusInWindow ();
252245 }
253246
254247 // -- Helper classes --
You can’t perform that action at this time.
0 commit comments