瀏覽代碼

Merge pull request #50547 from pycbouh/editor-theme-eagerly-grab-focus-on-popup-and-never-let-go

Fix focus behavior in the Add Item Type dialog of the Theme editor
Rémi Verschelde 4 年之前
父節點
當前提交
7537875d86
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      editor/plugins/theme_editor_plugin.cpp

+ 6 - 0
editor/plugins/theme_editor_plugin.cpp

@@ -2015,6 +2015,12 @@ void ThemeTypeDialog::_notification(int p_what) {
 		case NOTIFICATION_THEME_CHANGED: {
 			_update_add_type_options();
 		} break;
+
+		case NOTIFICATION_VISIBILITY_CHANGED: {
+			if (is_visible()) {
+				add_type_filter->grab_focus();
+			}
+		} break;
 	}
 }