summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 1241441d43..e16813125d 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -637,7 +637,7 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
_SelectResult res;
res.item = c;
- res.z = node ? node->get_z() : 0;
+ res.z_index = node ? node->get_z_index() : 0;
res.has_z = node;
r_items.push_back(res);
}
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 4be09a16e9..c45a906692 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -252,10 +252,10 @@ class CanvasItemEditor : public VBoxContainer {
struct _SelectResult {
CanvasItem *item;
- float z;
+ float z_index;
bool has_z;
_FORCE_INLINE_ bool operator<(const _SelectResult &p_rr) const {
- return has_z && p_rr.has_z ? p_rr.z < z : p_rr.has_z;
+ return has_z && p_rr.has_z ? p_rr.z_index < z_index : p_rr.has_z;
}
};