aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-04-26 11:13:44 -0400
committerbobzel <zzzman@gmail.com>2022-04-26 11:13:44 -0400
commit0fa5a34abf8dcd40784c0a9e2f89ba01937af024 (patch)
tree233bfe6f0c0ecf0a61301810b2bca7e9a7ca3e7c /src
parentc05404c741eac9288b8d8c62208b255b74a620d3 (diff)
from last
Diffstat (limited to 'src')
-rw-r--r--src/client/views/DocumentDecorations.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 2914e5ad4..def2be848 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -151,11 +151,12 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number, P
if (this.canDelete) {
const views = SelectionManager.Views().slice().filter(v => v);
if (force) this._deleteAfterIconify = true;
- if (!this._iconifyBatch) this._iconifyBatch = UndoManager.StartBatch("iconifying");
- else this._deleteAfterIconify = true;
- this._iconifyingCount = views.length;
+ if (!this._iconifyBatch) {
+ this._iconifyBatch = UndoManager.StartBatch("iconifying");
+ this._iconifyingCount = force ? 1 : views.length;
+ } else this._deleteAfterIconify = true;
const finished = () => {
- if (this._deleteAfterIconify || --this._iconifyingCount <= 0) {
+ if (--this._iconifyingCount <= 0) {
this._iconifyingCount = 0;
SelectionManager.DeselectAll();
if (this._deleteAfterIconify) views.forEach(iconView => iconView.props.removeDocument?.(iconView.props.Document));