浏览代码

Merge pull request #92808 from bruvzg/fix_ci_updates

Fix excessive canvas items updates.
Rémi Verschelde 1 年之前
父节点
当前提交
56a8db109c
共有 1 个文件被更改,包括 3 次插入5 次删除
  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) {