From 244433c9be9c26ddeee72624a78781eb2a645e06 Mon Sep 17 00:00:00 2001 From: ruinivist Date: Sun, 24 Aug 2025 14:31:50 +0000 Subject: [PATCH] fix setting of build cache extent when not init --- lib/core/controller/controller.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/controller/controller.dart b/lib/core/controller/controller.dart index 2123fe6..6ea474d 100644 --- a/lib/core/controller/controller.dart +++ b/lib/core/controller/controller.dart @@ -115,7 +115,9 @@ class LazyCanvasController with ChangeNotifier { /// Applied on the next build void setBuildCacheExtent(Offset extent) { _buildCacheExtent = extent + _kBuildCacheBuffer; - _buildExtent = Offset(_canvasSize.width, _canvasSize.height) + _buildCacheExtent!; + if (_init) { + _buildExtent = Offset(_canvasSize.width, _canvasSize.height) + _buildCacheExtent!; + } } // ==================== Utils ====================