Inline SchematicsDialog#focusSearchField

This commit is contained in:
Anuken
2021-09-22 20:25:01 -04:00
parent 9e718b633e
commit c8ab2bd1ba

View File

@@ -334,12 +334,6 @@ public class SchematicsDialog extends BaseDialog{
dialog.show(); dialog.show();
} }
public void focusSearchField(){
if(searchField == null) return;
Core.scene.setKeyboardFocus(searchField);
}
//adds all new tags to the global list of tags //adds all new tags to the global list of tags
//alternatively, unknown tags could be discarded on import? //alternatively, unknown tags could be discarded on import?
@@ -635,8 +629,8 @@ public class SchematicsDialog extends BaseDialog{
public Dialog show(){ public Dialog show(){
super.show(); super.show();
if(Core.app.isDesktop()){ if(Core.app.isDesktop() && searchField != null){
focusSearchField(); Core.scene.setKeyboardFocus(searchField);
} }
return this; return this;