Browse Source

Merge pull request #86290 from bruvzg/mac_tab_menu

[macOS] Fix updating editor tab titles in the dock menu.
Yuri Sizov 1 year ago
parent
commit
1f5d4a62e9
1 changed files with 3 additions and 1 deletions
  1. 3 1
      editor/gui/editor_scene_tabs.cpp

+ 3 - 1
editor/gui/editor_scene_tabs.cpp

@@ -191,12 +191,14 @@ void EditorSceneTabs::_disable_menu_option_if(int p_option, bool p_condition) {
 }
 }
 
 
 void EditorSceneTabs::update_scene_tabs() {
 void EditorSceneTabs::update_scene_tabs() {
+	static bool menu_initialized = false;
 	tab_preview_panel->hide();
 	tab_preview_panel->hide();
 
 
-	if (scene_tabs->get_tab_count() == EditorNode::get_editor_data().get_edited_scene_count()) {
+	if (menu_initialized && scene_tabs->get_tab_count() == EditorNode::get_editor_data().get_edited_scene_count()) {
 		_update_tab_titles();
 		_update_tab_titles();
 		return;
 		return;
 	}
 	}
+	menu_initialized = true;
 
 
 	if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_GLOBAL_MENU)) {
 	if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_GLOBAL_MENU)) {
 		DisplayServer::get_singleton()->global_menu_clear("_dock");
 		DisplayServer::get_singleton()->global_menu_clear("_dock");