aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-10-01 12:27:20 -0400
committerbobzel <zzzman@gmail.com>2024-10-01 12:27:20 -0400
commit8c1f6f03de08e442df90dfbb6c9049e1c15ae353 (patch)
tree68c4c2665704dd44040cb92607da992821dfffff
parent9f204c5dfbd2570f40f0d60e5e50815f8376a8c2 (diff)
don't unset activeTool in smartDraw handler and don't do anything if smartDraw is not shown
-rw-r--r--src/client/views/smartdraw/SmartDrawHandler.tsx19
1 files changed, 10 insertions, 9 deletions
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<object> {
*/
@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;
+ }
};
/**