Pārlūkot izejas kodu

Merge pull request #66266 from Calinou/editor-description-fix-tooltip-update

Fix Editor Description tooltip not changing until scene is reopened
Rémi Verschelde 2 gadi atpakaļ
vecāks
revīzija
080c795054
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. 9 0
      scene/main/node.cpp

+ 9 - 0
scene/main/node.cpp

@@ -1987,7 +1987,16 @@ String Node::get_scene_file_path() const {
 }
 }
 
 
 void Node::set_editor_description(const String &p_editor_description) {
 void Node::set_editor_description(const String &p_editor_description) {
+	if (data.editor_description == p_editor_description) {
+		return;
+	}
+
 	data.editor_description = p_editor_description;
 	data.editor_description = p_editor_description;
+
+	if (Engine::get_singleton()->is_editor_hint() && is_inside_tree()) {
+		// Update tree so the tooltip in the Scene tree dock is also updated in the editor.
+		get_tree()->tree_changed();
+	}
 }
 }
 
 
 String Node::get_editor_description() const {
 String Node::get_editor_description() const {