|
@@ -696,7 +696,7 @@ export class Wnd {
|
|
|
model.send("closews", {});
|
|
|
}
|
|
|
|
|
|
- private removeTabAction = (id: string, closeAll = false, animate = true) => {
|
|
|
+ private removeTabAction = (id: string, closeAll = false, animate = true, isSaveLayout = true) => {
|
|
|
clearCounter();
|
|
|
this.children.find((item, index) => {
|
|
|
if (item.id === id) {
|
|
@@ -792,7 +792,9 @@ export class Wnd {
|
|
|
setTitle(window.siyuan.languages.siyuanNote);
|
|
|
}
|
|
|
}
|
|
|
- saveLayout();
|
|
|
+ if (isSaveLayout) {
|
|
|
+ saveLayout();
|
|
|
+ }
|
|
|
/// #if !BROWSER
|
|
|
webFrame.clearCache();
|
|
|
ipcRenderer.send(Constants.SIYUAN_CMD, "clearCache");
|
|
@@ -800,7 +802,7 @@ export class Wnd {
|
|
|
/// #endif
|
|
|
};
|
|
|
|
|
|
- public removeTab(id: string, closeAll = false, animate = true) {
|
|
|
+ public removeTab(id: string, closeAll = false, animate = true, isSaveLayout = true) {
|
|
|
for (let index = 0; index < this.children.length; index++) {
|
|
|
const item = this.children[index];
|
|
|
if (item.id === id) {
|
|
@@ -809,9 +811,9 @@ export class Wnd {
|
|
|
showMessage(window.siyuan.languages.uploading);
|
|
|
return;
|
|
|
}
|
|
|
- this.removeTabAction(id, closeAll, animate);
|
|
|
+ this.removeTabAction(id, closeAll, animate, isSaveLayout);
|
|
|
} else {
|
|
|
- this.removeTabAction(id, closeAll, animate);
|
|
|
+ this.removeTabAction(id, closeAll, animate, isSaveLayout);
|
|
|
}
|
|
|
return;
|
|
|
}
|