mirror of
https://github.com/godotengine/godot.git
synced 2025-03-13 23:41:08 +08:00
Merge pull request #92489 from kleonc/control-invalidate-global-transform-before-notifying-resize
Invalidate `Control` global transform before notifying about resize / rect change
This commit is contained in:
commit
adbc4b086b
@ -1739,12 +1739,15 @@ void Control::_size_changed() {
|
|||||||
data.size_cache = new_size_cache;
|
data.size_cache = new_size_cache;
|
||||||
|
|
||||||
if (is_inside_tree()) {
|
if (is_inside_tree()) {
|
||||||
if (size_changed) {
|
|
||||||
notification(NOTIFICATION_RESIZED);
|
|
||||||
}
|
|
||||||
if (pos_changed || size_changed) {
|
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();
|
_notify_transform();
|
||||||
|
|
||||||
|
if (size_changed) {
|
||||||
|
notification(NOTIFICATION_RESIZED);
|
||||||
|
}
|
||||||
|
item_rect_changed(size_changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos_changed && !size_changed) {
|
if (pos_changed && !size_changed) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user