diff options
author | bobzel <zzzman@gmail.com> | 2022-08-08 17:56:57 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-08-08 17:56:57 -0400 |
commit | 59228638d2ac10a3c670bcf94afc57369d201817 (patch) | |
tree | 1522d49af674d909c71647ed2dc1e70f2679e56f /src | |
parent | f9cded6755ee236d88e21b3b2d4c6da357d059b2 (diff) |
fixed recent bug where dragging actions wasn't undoable. changed closing an icon to deiconify it first so that following a link to it won't show the icon.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/DragManager.ts | 3 | ||||
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index 947882958..ccd94c56e 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -457,7 +457,8 @@ export namespace DragManager { document.removeEventListener('pointerup', upHandler, true); SnappingManager.SetIsDragging(false); SnappingManager.clearSnapLines(); - if (undo && batch.end()) UndoManager.Undo(); + const ended = batch.end(); + if (undo && ended) UndoManager.Undo(); docsBeingDragged.length = 0; }); var startWindowDragTimer: any; diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 7628beef2..3544f74b4 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -201,7 +201,10 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P const finished = action((force?: boolean) => { if ((force || --iconifyingCount === 0) && this._iconifyBatch) { if (this._deleteAfterIconify) { - views.forEach(iconView => iconView.props.removeDocument?.(iconView.props.Document)); + views.forEach(iconView => { + Doc.setNativeView(iconView.props.Document); + iconView.props.removeDocument?.(iconView.props.Document); + }); SelectionManager.DeselectAll(); } this._iconifyBatch?.end(); |