From 8c1f6f03de08e442df90dfbb6c9049e1c15ae353 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 1 Oct 2024 12:27:20 -0400 Subject: don't unset activeTool in smartDraw handler and don't do anything if smartDraw is not shown --- src/client/views/smartdraw/SmartDrawHandler.tsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/client/views/smartdraw/SmartDrawHandler.tsx b/src/client/views/smartdraw/SmartDrawHandler.tsx index e362c0c89..d45baa7c5 100644 --- a/src/client/views/smartdraw/SmartDrawHandler.tsx +++ b/src/client/views/smartdraw/SmartDrawHandler.tsx @@ -148,15 +148,16 @@ export class SmartDrawHandler extends ObservableReactComponent { */ @action hideSmartDrawHandler = () => { - this.ShowRegenerate = false; - this._display = false; - this._isLoading = false; - this._showOptions = false; - this._userInput = ''; - this._complexity = 5; - this._size = 350; - this._autoColor = true; - Doc.ActiveTool = InkTool.None; + if (this._display) { + this.ShowRegenerate = false; + this._display = false; + this._isLoading = false; + this._showOptions = false; + this._userInput = ''; + this._complexity = 5; + this._size = 350; + this._autoColor = true; + } }; /** -- cgit v1.2.3-70-g09d2