aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocComponent.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-07-14 09:47:18 -0400
committerbobzel <zzzman@gmail.com>2021-07-14 09:47:18 -0400
commit7995c8b9b810df4ed5ade1db71fcb0e2de3d3da2 (patch)
treeccad04e130f8ac6e0c73198db9a343ed7ff7b386 /src/client/views/DocComponent.tsx
parent9980ea76280021e37edecb3364e1ef630ce10d58 (diff)
fixed selections so that they persist on deselect to allow linking a selection on one document directly to a selection on another document. Also fixed recently closed to move closed document to top of list.
Diffstat (limited to 'src/client/views/DocComponent.tsx')
-rw-r--r--src/client/views/DocComponent.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx
index a878a7afb..0b54e3cd6 100644
--- a/src/client/views/DocComponent.tsx
+++ b/src/client/views/DocComponent.tsx
@@ -154,7 +154,10 @@ export function ViewBoxAnnotatableComponent<P extends ViewBoxAnnotatableProps, T
leavePushpin && DocUtils.LeavePushpin(doc, annotationKey ?? this.annotationKey);
Doc.RemoveDocFromList(targetDataDoc, annotationKey ?? this.annotationKey, doc);
doc.context = undefined;
- recent && Doc.AddDocToList(recent, "data", doc, undefined, true, true);
+ if (recent) {
+ Doc.RemoveDocFromList(recent, "data", doc);
+ Doc.AddDocToList(recent, "data", doc, undefined, true, true);
+ }
});
this.props.select(false);
return true;