summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-09-22 18:29:11 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2023-01-30 00:18:13 +0100
commit9f026d5274a1740b07a3fd59eedb2a456c0eb326 (patch)
treeb522d365b28dd2acb79f44876fe8ca2f1fd56856 /scene
parentd01ac9c73686fdf86f083f4d3ee1301bb54d855f (diff)
Fix Editor Description tooltip not changing until scene is reopened
You still need to select another node to see the tooltip updated first, but you no longer need to save and reopen the scene to view the updated tooltip.
Diffstat (limited to 'scene')
-rw-r--r--scene/main/node.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index de486094fe..ba75c92c85 100644
--- a/scene/main/node.cpp
+++ b/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) {
+ if (data.editor_description == p_editor_description) {
+ return;
+ }
+
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 {