diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-10-29 10:34:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-29 10:34:45 +0100 |
commit | f7b6d41fe7e4b4eeedae6e639397fc56268cb769 (patch) | |
tree | cb52916a70d351599b811e3400a71e66f9fc79dc /modules/visual_script/visual_script_editor.cpp | |
parent | b947e758237ac43be52523bad69f94b5d8136e1a (diff) | |
parent | 45fe9f184564ea5bfcd7a3a7f51673a5eaabef50 (diff) | |
download | redot-engine-f7b6d41fe7e4b4eeedae6e639397fc56268cb769.tar.gz |
Merge pull request #23353 from Chaosus/update_vscript_theme
Updates visualscript editor when theme is changed
Diffstat (limited to 'modules/visual_script/visual_script_editor.cpp')
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 7fdd7fe446..a80a015ed3 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -3018,11 +3018,15 @@ void VisualScriptEditor::_node_filter_changed(const String &p_text) { void VisualScriptEditor::_notification(int p_what) { - if (p_what == NOTIFICATION_READY) { + if (p_what == NOTIFICATION_READY || (p_what == NOTIFICATION_THEME_CHANGED && is_visible_in_tree())) { + node_filter->set_right_icon(Control::get_icon("Search", "EditorIcons")); node_filter->set_clear_button_enabled(true); - variable_editor->connect("changed", this, "_update_members"); - signal_editor->connect("changed", this, "_update_members"); + + if (p_what == NOTIFICATION_READY) { + variable_editor->connect("changed", this, "_update_members"); + signal_editor->connect("changed", this, "_update_members"); + } Ref<Theme> tm = EditorNode::get_singleton()->get_theme_base()->get_theme(); @@ -3056,8 +3060,12 @@ void VisualScriptEditor::_notification(int p_what) { node_styles[E->get().first] = frame_style; } } - } - if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { + + if (is_visible_in_tree()) { + _update_members(); + _update_graph(); + } + } else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { left_vsplit->set_visible(is_visible_in_tree()); } } |