diff options
| author | bobzel <zzzman@gmail.com> | 2024-06-21 12:06:01 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-06-21 12:06:01 -0400 |
| commit | 25ff5e562e80a93edc0d475b104862361a049016 (patch) | |
| tree | d25ff45697bf8c06aeb577c52f0df232a38b43fa /src/client/views/global | |
| parent | ad32c1606395cdc71ba50eb9b51d3a9d3b707ca0 (diff) | |
| parent | 50980b834cc41b8048d3e04c5244c6bce652f788 (diff) | |
merged with master. fixed conflicts in comparisonBox
Diffstat (limited to 'src/client/views/global')
| -rw-r--r-- | src/client/views/global/globalScripts.ts | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/client/views/global/globalScripts.ts b/src/client/views/global/globalScripts.ts index 7730ed385..a985986d6 100644 --- a/src/client/views/global/globalScripts.ts +++ b/src/client/views/global/globalScripts.ts @@ -450,15 +450,19 @@ function setActiveTool(tool: InkTool | Gestures, keepPrim: boolean, checkResult? GestureOverlay.Instance.InkShape = tool as Gestures; } } else if (tool) { - if ([InkTool.StrokeEraser, InkTool.RadiusEraser, InkTool.SegmentEraser].includes(tool as any)) { - Doc.UserDoc().activeEraserTool = tool; - } - // pen or eraser - if (Doc.ActiveTool === tool && !GestureOverlay.Instance.InkShape && !keepPrim) { + if (Doc.UserDoc().ActiveTool === tool) { Doc.ActiveTool = InkTool.None; } else { - Doc.ActiveTool = tool as any; - GestureOverlay.Instance.InkShape = undefined; + if ([InkTool.StrokeEraser, InkTool.RadiusEraser, InkTool.SegmentEraser].includes(tool as any)) { + Doc.UserDoc().activeEraserTool = tool; + } + // pen or eraser + if (Doc.ActiveTool === tool && !GestureOverlay.Instance.InkShape && !keepPrim) { + Doc.ActiveTool = InkTool.None; + } else { + Doc.ActiveTool = tool as any; + GestureOverlay.Instance.InkShape = undefined; + } } } else { Doc.ActiveTool = InkTool.None; |
