Jelajahi Sumber

Fix excessive canvas items updates.

bruvzg 1 tahun lalu
induk
melakukan
864a93fdbf
1 mengubah file dengan 3 tambahan dan 5 penghapusan
  1. 3 5
      scene/main/window.cpp

+ 3 - 5
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) {