diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-08 10:14:58 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-08 10:17:25 +0100 |
commit | fc076ece3ddecd44a62dc0febed7baee47f2eede (patch) | |
tree | 6401f0a7ae1b39d516f86a0a44cd7c14aec569a6 /editor/plugins/replication_editor_plugin.cpp | |
parent | 0154ce2c8d66528d617e10b139640fd4c4405c6b (diff) | |
download | redot-engine-fc076ece3ddecd44a62dc0febed7baee47f2eede.tar.gz |
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a092053434545c32afae91ccbdfbe792.
As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
Diffstat (limited to 'editor/plugins/replication_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/replication_editor_plugin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/plugins/replication_editor_plugin.cpp b/editor/plugins/replication_editor_plugin.cpp index 467db13246..93f4a853f3 100644 --- a/editor/plugins/replication_editor_plugin.cpp +++ b/editor/plugins/replication_editor_plugin.cpp @@ -95,7 +95,7 @@ void ReplicationEditor::_bind_methods() { void ReplicationEditor::_notification(int p_what) { if (p_what == NOTIFICATION_ENTER_TREE || p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) { - add_theme_style_override(SNAME("panel"), editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel"))); + add_theme_style_override("panel", editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel"))); } else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { update_keying(); } @@ -257,10 +257,10 @@ void ReplicationEditor::edit(MultiplayerSynchronizer *p_sync) { } Ref<Texture2D> ReplicationEditor::_get_class_icon(const Node *p_node) { - if (!p_node || !has_theme_icon(p_node->get_class(), SNAME("EditorIcons"))) { - return get_theme_icon(SNAME("ImportFail"), SNAME("EditorIcons")); + if (!p_node || !has_theme_icon(p_node->get_class(), "EditorIcons")) { + return get_theme_icon("ImportFail", "EditorIcons"); } - return get_theme_icon(p_node->get_class(), SNAME("EditorIcons")); + return get_theme_icon(p_node->get_class(), "EditorIcons"); } void ReplicationEditor::_add_property(const NodePath &p_property, bool p_spawn, bool p_sync) { @@ -285,7 +285,7 @@ void ReplicationEditor::_add_property(const NodePath &p_property, bool p_spawn, icon = _get_class_icon(node); } item->set_icon(0, icon); - item->add_button(3, get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); + item->add_button(3, get_theme_icon("Remove", "EditorIcons")); item->set_text_alignment(1, HORIZONTAL_ALIGNMENT_CENTER); item->set_cell_mode(1, TreeItem::CELL_MODE_CHECK); item->set_checked(1, p_spawn); |