Invalidate Control global transform before notifying about resize / rect change
This commit is contained in:
parent
1e6b11dcd4
commit
22b6f962d9
1 changed files with 7 additions and 4 deletions
|
@ -1739,12 +1739,15 @@ void Control::_size_changed() {
|
|||
data.size_cache = new_size_cache;
|
||||
|
||||
if (is_inside_tree()) {
|
||||
if (size_changed) {
|
||||
notification(NOTIFICATION_RESIZED);
|
||||
}
|
||||
if (pos_changed || size_changed) {
|
||||
item_rect_changed(size_changed);
|
||||
// Ensure global transform is marked as dirty before `NOTIFICATION_RESIZED` / `item_rect_changed` signal
|
||||
// so an up to date global transform could be obtained when handling these.
|
||||
_notify_transform();
|
||||
|
||||
if (size_changed) {
|
||||
notification(NOTIFICATION_RESIZED);
|
||||
}
|
||||
item_rect_changed(size_changed);
|
||||
}
|
||||
|
||||
if (pos_changed && !size_changed) {
|
||||
|
|
Loading…
Reference in a new issue