From 90fd1a4c16f5e3875b1ac8f7c78a363b39215a92 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 17 Feb 2021 11:30:42 -0500 Subject: improved fileSysMode for treeView. added dontUndo flag --- src/client/views/nodes/DocumentView.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/client/views/nodes/DocumentView.tsx') 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 { - 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(); -- cgit v1.2.3-70-g09d2