void GraphEdit::_graph_node_raised(Node *p_gn) { GraphNode *gn = p_gn->cast_to<GraphNode>(); ERR_FAIL_COND(!gn); gn->raise(); if (gn->is_comment()) { move_child(gn, 0); } int first_not_comment = 0; for (int i = 0; i < get_child_count(); i++) { GraphNode *gn = get_child(i)->cast_to<GraphNode>(); if (gn && !gn->is_comment()) { first_not_comment = i; break; } } move_child(connections_layer, first_not_comment); top_layer->raise(); emit_signal("node_selected", p_gn); }