Fix update of canvas AABB with update_when_visible

Ensure the AABB of canvas items is always updated when
`update_when_visible` is enabled.
This commit is contained in:
JFonS 2019-02-17 20:28:00 +01:00
parent 006561a081
commit 964338b06b

View file

@ -870,7 +870,7 @@ public:
Rect2 global_rect_cache;
const Rect2 &get_rect() const {
if (custom_rect || !rect_dirty)
if (custom_rect || (!rect_dirty && !update_when_visible))
return rect;
//must update rect