From 0316c7bcd85cce9332bc65ffa366cb2571e1ca0f Mon Sep 17 00:00:00 2001 From: open-trade Date: Sun, 22 Aug 2021 07:50:12 +0800 Subject: [PATCH] clear bug --- flutter_hbb/lib/model.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flutter_hbb/lib/model.dart b/flutter_hbb/lib/model.dart index 397b5b3fc..db897443d 100644 --- a/flutter_hbb/lib/model.dart +++ b/flutter_hbb/lib/model.dart @@ -295,11 +295,11 @@ class CanvasModel with ChangeNotifier { notifyListeners(); } - void clear() { + void clear([bool notify=false]) { _x = 0; _y = 0; _scale = 1.0; - notifyListeners(); + if (notify) notifyListeners(); } } @@ -357,7 +357,7 @@ class CursorModel with ChangeNotifier { _x = _displayOriginX; _y = _displayOriginY; FFI.moveMouse(_x, _y); - FFI.canvasModel.clear(); + FFI.canvasModel.clear(true); notifyListeners(); }