diff options
author | bobzel <zzzman@gmail.com> | 2021-02-17 11:30:42 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-17 11:30:42 -0500 |
commit | 90fd1a4c16f5e3875b1ac8f7c78a363b39215a92 (patch) | |
tree | 92d33658bee6320bb33fbde2edaa480c9023c47a /src/client/views/nodes/DocumentView.tsx | |
parent | 1a31f3ae5d1b90deb9888bb4df863079f4837f53 (diff) |
improved fileSysMode for treeView. added dontUndo flag
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index e52791901..cb42d1c19 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -465,13 +465,8 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps clientY: clientY, shiftKey }, console.log); - const clickFunc = () => { - if (!Doc.AreProtosEqual(this.props.Document, Doc.UserDoc()["dockedBtn-undo"] as Doc) && - !Doc.AreProtosEqual(this.props.Document, Doc.UserDoc()["dockedBtn-redo"] as Doc) && - !this.onClickHandler.script.originalScript.includes("selectMainMenu")) { - UndoManager.RunInBatch(() => func().result?.select === true ? this.props.select(false) : "", "on click"); - } else func(); - }; + const clickFunc = () => this.props.Document.dontUndo ? func() : + UndoManager.RunInBatch(() => func().result?.select === true ? this.props.select(false) : "", "on click"); if (this.onDoubleClickHandler) { this._timeout = setTimeout(() => { this._timeout = undefined; clickFunc(); }, 350); } else clickFunc(); |