summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-04 01:17:41 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-04 01:17:41 -0300
commit76c2e8583e70e8c976a306e77a40e8e7226aa249 (patch)
treefe260ef3c0d00996d537f2fe3b8c78abfb92aa60 /servers/visual
parentb085c40edfac45ec1c8b866c789f6e9bab7e5e08 (diff)
parent3a0c19d3f6ddb26359c95d84c376a8e6b1afd04d (diff)
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/visual_server_canvas.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/servers/visual/visual_server_canvas.h b/servers/visual/visual_server_canvas.h
index b5412ed608..e1edc47f9f 100644
--- a/servers/visual/visual_server_canvas.h
+++ b/servers/visual/visual_server_canvas.h
@@ -44,7 +44,10 @@ public:
_FORCE_INLINE_ bool operator()(const Item* p_left,const Item* p_right) const {
- return p_left->xform.elements[2].y < p_right->xform.elements[2].y;
+ if(Math::abs(p_left->xform.elements[2].y - p_right->xform.elements[2].y) < CMP_EPSILON )
+ return p_left->xform.elements[2].x < p_right->xform.elements[2].x;
+ else
+ return p_left->xform.elements[2].y < p_right->xform.elements[2].y;
}
};