File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -2630,6 +2630,10 @@ void VisualShaderEditor::_update_graph() {
26302630 return ;
26312631 }
26322632
2633+ if (!is_inside_tree ()) {
2634+ return ;
2635+ }
2636+
26332637 VisualShader::Type type = get_current_shader_type ();
26342638
26352639 graph->clear_connections ();
@@ -5343,12 +5347,18 @@ void VisualShaderEditor::_notification(int p_what) {
53435347
53445348 if (is_visible_in_tree ()) {
53455349 _update_graph ();
5350+ } else {
5351+ theme_dirty = true ;
53465352 }
53475353 update_toggle_files_button ();
53485354 } break ;
53495355
53505356 case NOTIFICATION_VISIBILITY_CHANGED: {
53515357 update_toggle_files_button ();
5358+ if (theme_dirty && is_visible_in_tree ()) {
5359+ theme_dirty = false ;
5360+ _update_graph ();
5361+ }
53525362 } break ;
53535363
53545364 case NOTIFICATION_DRAG_BEGIN: {
Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ class VisualShaderEditor : public ShaderEditor {
235235 CheckBox *custom_mode_box = nullptr ;
236236 bool custom_mode_enabled = false ;
237237
238+ bool theme_dirty = false ;
238239 bool pending_update_preview = false ;
239240 bool shader_error = false ;
240241 AcceptDialog *code_preview_window = nullptr ;
You can’t perform that action at this time.
0 commit comments