Skip to content

Commit f6dbc04

Browse files
committed
Merge pull request #97809 from Geometror/fix-ge-conn-layer-warning
[GraphEdit] Only print warning for connection layer deletion when justified
2 parents b0d5126 + 975e7c8 commit f6dbc04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scene/gui/graph_edit.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,9 @@ void GraphEdit::remove_child_notify(Node *p_child) {
653653
minimap = nullptr;
654654
} else if (p_child == connections_layer) {
655655
connections_layer = nullptr;
656-
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.");
656+
if (is_inside_tree()) {
657+
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.");
658+
}
657659
}
658660

659661
if (top_layer != nullptr && is_inside_tree()) {

0 commit comments

Comments
 (0)