diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-20 21:49:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-20 21:49:32 +0200 |
commit | 693f9b4e20f76d56ead91f8a8cad204516d2d953 (patch) | |
tree | eb98d46ce7bdef9fce187af3bcef7ebea7961a34 /scene/main/canvas_item.cpp | |
parent | 3478690c0fd67efc4f269c08dc7093c04fbf86db (diff) | |
parent | a6adb584934a885adf6ca775f2ef7118b66f684e (diff) |
Merge pull request #50655 from JFonS/sname_opt
Editor StringName and Viewport optimizations
Diffstat (limited to 'scene/main/canvas_item.cpp')
-rw-r--r-- | scene/main/canvas_item.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp index c3fd62640a..5a12480577 100644 --- a/scene/main/canvas_item.cpp +++ b/scene/main/canvas_item.cpp @@ -523,7 +523,7 @@ void CanvasItem::_enter_canvas() { get_viewport()->gui_reset_canvas_sort_index(); } - get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE, group, "_top_level_raise_self"); + get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE, group, SNAME("_top_level_raise_self")); } else { CanvasItem *parent = get_parent_item(); @@ -542,7 +542,7 @@ void CanvasItem::_exit_canvas() { notification(NOTIFICATION_EXIT_CANVAS, true); //reverse the notification RenderingServer::get_singleton()->canvas_item_set_parent(canvas_item, RID()); canvas_layer = nullptr; - group = ""; + group = StringName(); } void CanvasItem::_notification(int p_what) { @@ -588,7 +588,7 @@ void CanvasItem::_notification(int p_what) { break; } - if (group != "") { + if (group != StringName()) { get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE, group, "_top_level_raise_self"); } else { CanvasItem *p = get_parent_item(); @@ -648,7 +648,7 @@ void CanvasItem::update() { pending_update = true; - MessageQueue::get_singleton()->push_call(this, "_update_callback"); + MessageQueue::get_singleton()->push_call(this, SNAME("_update_callback")); } void CanvasItem::set_modulate(const Color &p_modulate) { |