From 864a93fdbf282232d50695fdb8054e323a4f743b Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Wed, 5 Jun 2024 21:01:30 +0300 Subject: [PATCH] Fix excessive canvas items updates. --- scene/main/window.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 1c5f9cc66351..39e5b6de33a1 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -1229,14 +1229,12 @@ void Window::_update_viewport_size() { } if (!Math::is_equal_approx(TS->font_get_global_oversampling(), font_oversampling)) { TS->font_set_global_oversampling(font_oversampling); - ci_updated = false; + if (!ci_updated) { + update_canvas_items(); + } } } - if (!ci_updated) { - update_canvas_items(); - } - notification(NOTIFICATION_WM_SIZE_CHANGED); if (embedder) {