Skip to content

Commit

Permalink
[GraphEdit] Only print warning for connection layer deletion when jus…
Browse files Browse the repository at this point in the history
…tified
  • Loading branch information
Geometror committed Oct 4, 2024
1 parent f032af7 commit 975e7c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scene/gui/graph_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 975e7c8

Please sign in to comment.