summaryrefslogtreecommitdiffstats
path: root/editor/plugins/visual_shader_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-08-29 11:57:54 +0200
committerGitHub <noreply@github.com>2022-08-29 11:57:54 +0200
commit0b8a63e47193ee3e6cd6c0986993a85fc693ca54 (patch)
treef924f74107842bd3c316f5c5c9ab5da810314c43 /editor/plugins/visual_shader_editor_plugin.cpp
parent223e083d36ac1ca3f7aa46898d8870e476132f7a (diff)
parentfd6453c45ec0da79f2c7794b1c94f31fd6e477d7 (diff)
downloadredot-engine-0b8a63e47193ee3e6cd6c0986993a85fc693ca54.tar.gz
Merge pull request #65025 from akien-mga/revert-62846
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.cpp')
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 579c816dd8..83341b3016 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -1716,6 +1716,7 @@ void VisualShaderEditor::_update_graph() {
graph_plugin->clear_links();
graph_plugin->make_dirty(true);
+ graph_plugin->update_theme();
for (int n_i = 0; n_i < nodes.size(); n_i++) {
graph_plugin->add_node(type, nodes[n_i]);
@@ -3703,11 +3704,9 @@ void VisualShaderEditor::_notification(int p_what) {
graph->get_panner()->setup((ViewPanner::ControlScheme)EDITOR_GET("editors/panning/sub_editors_panning_scheme").operator int(), ED_GET_SHORTCUT("canvas_item_editor/pan_view"), bool(EditorSettings::get_singleton()->get("editors/panning/simple_panning")));
graph->set_warped_panning(bool(EditorSettings::get_singleton()->get("editors/panning/warped_mouse_panning")));
- } break;
-
+ [[fallthrough]];
+ }
case NOTIFICATION_THEME_CHANGED: {
- graph_plugin->update_theme();
-
highend_label->set_modulate(get_theme_color(SNAME("vulkan_color"), SNAME("Editor")));
node_filter->set_right_icon(Control::get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
@@ -3760,7 +3759,7 @@ void VisualShaderEditor::_notification(int p_what) {
tools->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("Tools"), SNAME("EditorIcons")));
- if (is_visible_in_tree()) {
+ if (p_what == NOTIFICATION_THEME_CHANGED && is_visible_in_tree()) {
_update_graph();
}
} break;