Explorar o código

Merge pull request #59977 from timothyqiu/type-filter-focus

Rémi Verschelde %!s(int64=3) %!d(string=hai) anos
pai
achega
14856b1dbd
Modificáronse 1 ficheiros con 3 adicións e 5 borrados
  1. 3 5
      editor/plugins/theme_editor_plugin.cpp

+ 3 - 5
editor/plugins/theme_editor_plugin.cpp

@@ -1947,7 +1947,6 @@ ThemeItemEditorDialog::ThemeItemEditorDialog() {
 
 void ThemeTypeDialog::_dialog_about_to_show() {
 	add_type_filter->set_text("");
-	add_type_filter->grab_focus();
 
 	_update_add_type_options();
 }
@@ -2027,14 +2026,13 @@ void ThemeTypeDialog::_notification(int p_what) {
 			connect("about_to_show", this, "_dialog_about_to_show");
 			FALLTHROUGH;
 		}
+
 		case NOTIFICATION_THEME_CHANGED: {
 			_update_add_type_options();
 		} break;
 
-		case NOTIFICATION_VISIBILITY_CHANGED: {
-			if (is_visible()) {
-				add_type_filter->grab_focus();
-			}
+		case NOTIFICATION_POST_POPUP: {
+			add_type_filter->grab_focus();
 		} break;
 	}
 }