aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/CurrentUserUtils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-02-17 11:30:42 -0500
committerbobzel <zzzman@gmail.com>2021-02-17 11:30:42 -0500
commit90fd1a4c16f5e3875b1ac8f7c78a363b39215a92 (patch)
tree92d33658bee6320bb33fbde2edaa480c9023c47a /src/client/util/CurrentUserUtils.ts
parent1a31f3ae5d1b90deb9888bb4df863079f4837f53 (diff)
improved fileSysMode for treeView. added dontUndo flag
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r--src/client/util/CurrentUserUtils.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 509f08e9d..f088bf509 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -548,6 +548,7 @@ export class CurrentUserUtils {
iconShape: "square",
_stayInCollection: true,
_hideContextMenu: true,
+ dontUndo: true,
title,
target,
_backgroundColor: "black",
@@ -578,6 +579,7 @@ export class CurrentUserUtils {
DocListCastAsync(btns).then(bts => bts?.forEach(btn => {
btn.color = "white";
btn._backgroundColor = "";
+ btn.dontUndo = true;
}));
});
});
@@ -848,14 +850,16 @@ export class CurrentUserUtils {
/// sets up the default list of buttons to be shown in the expanding button menu at the bottom of the Dash window
static setupDockedButtons(doc: Doc) {
if (doc["dockedBtn-undo"] === undefined) {
- doc["dockedBtn-undo"] = CurrentUserUtils.ficon({ onClick: ScriptField.MakeScript("undo()"), _stayInCollection: true, dropAction: "alias", _hideContextMenu: true, removeDropProperties: new List<string>(["dropAction", "_hideContextMenu", "stayInCollection"]), toolTip: "click to undo", title: "undo", icon: "undo-alt", system: true });
+ doc["dockedBtn-undo"] = CurrentUserUtils.ficon({ onClick: ScriptField.MakeScript("undo()"), dontUndo: true, _stayInCollection: true, dropAction: "alias", _hideContextMenu: true, removeDropProperties: new List<string>(["dropAction", "_hideContextMenu", "stayInCollection"]), toolTip: "click to undo", title: "undo", icon: "undo-alt", system: true });
}
if (doc["dockedBtn-redo"] === undefined) {
- doc["dockedBtn-redo"] = CurrentUserUtils.ficon({ onClick: ScriptField.MakeScript("redo()"), _stayInCollection: true, dropAction: "alias", _hideContextMenu: true, removeDropProperties: new List<string>(["dropAction", "_hideContextMenu", "stayInCollection"]), toolTip: "click to redo", title: "redo", icon: "redo-alt", system: true });
+ doc["dockedBtn-redo"] = CurrentUserUtils.ficon({ onClick: ScriptField.MakeScript("redo()"), dontUndo: true, _stayInCollection: true, dropAction: "alias", _hideContextMenu: true, removeDropProperties: new List<string>(["dropAction", "_hideContextMenu", "stayInCollection"]), toolTip: "click to redo", title: "redo", icon: "redo-alt", system: true });
}
if (doc.dockedBtns === undefined) {
doc.dockedBtns = CurrentUserUtils.blist({ title: "docked buttons", ignoreClick: true }, [doc["dockedBtn-undo"] as Doc, doc["dockedBtn-redo"] as Doc]);
}
+ (doc["dockedBtn-undo"] as Doc).dontUndo = true;
+ (doc["dockedBtn-redo"] as Doc).dontUndo = true;
}
// sets up the default set of documents to be shown in the Overlay layer
static setupOverlays(doc: Doc) {