aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-27 22:35:15 -0400
committerbobzel <zzzman@gmail.com>2020-08-27 22:35:15 -0400
commitd74811f0877709ad4005651bbd6eb9213378e45a (patch)
treef3115b47431a7944448067a4411e2edb52bd65bd /src/client/views/nodes/DocumentView.tsx
parent749fbe6ae14497cb0397905657bd66cb0182707c (diff)
fixed up undo for copy/cloning documents and for opening mainMenu sidebar
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 171b33d42..b2e474f68 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -335,7 +335,9 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
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)) {
+ 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, "on click");
} else func();
};