diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-10-04 22:43:49 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-10-04 22:43:49 +0200 |
commit | f6dbc04bd12acb132dca9465e584d0af0aa254b0 (patch) | |
tree | 64f650d62c1dbf1b5e8ba41c4c1168f8a3d8fbc9 /scene | |
parent | b0d512636cc903fba15ef271ef95211f1223ab8b (diff) | |
parent | 975e7c8ade76c71def276ff15f46bf925cc63d23 (diff) | |
download | redot-engine-f6dbc04bd12acb132dca9465e584d0af0aa254b0.tar.gz |
Merge pull request #97809 from Geometror/fix-ge-conn-layer-warning
[GraphEdit] Only print warning for connection layer deletion when justified
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/graph_edit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 9040693a6d..646757008a 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -653,7 +653,9 @@ void GraphEdit::remove_child_notify(Node *p_child) { minimap = nullptr; } else if (p_child == connections_layer) { connections_layer = nullptr; - WARN_PRINT("GraphEdit's connection_layer removed. This should not be done. If you like to remove all GraphElements from a GraphEdit node, do not simply remove all non-internal children but check their type since the connection layer has to be kept non-internal due to technical reasons."); + if (is_inside_tree()) { + WARN_PRINT("GraphEdit's connection_layer removed. This should not be done. If you like to remove all GraphElements from a GraphEdit node, do not simply remove all non-internal children but check their type since the connection layer has to be kept non-internal due to technical reasons."); + } } if (top_layer != nullptr && is_inside_tree()) { |