summaryrefslogtreecommitdiff
path: root/scene/main/canvas_item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/canvas_item.cpp')
-rw-r--r--scene/main/canvas_item.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index 093e4a8cd3..05d86f77f2 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -373,7 +373,7 @@ void CanvasItem::move_to_front() {
if (!get_parent()) {
return;
}
- get_parent()->move_child(this, get_parent()->get_child_count() - 1);
+ get_parent()->move_child(this, -1);
}
void CanvasItem::set_modulate(const Color &p_modulate) {