From 661c1367d27fa23c3aeb62369e92cd36eb5edabd Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Sat, 21 Oct 2023 00:41:23 -0400
Subject: change to doc decorations to be more "lightweight". made linkBox
 render links in a freeform view as a DocView.  added an auto-reset view
 option for freeforms.  fixed highlighting ink strokes.  Made groups behave
 better for selecting things 'inside' the group bounding box that aren't in
 the group.   Added vertically centered text option.

---
 src/client/views/collections/TreeView.tsx | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'src/client/views/collections/TreeView.tsx')

diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx
index f89aa065b..b57402531 100644
--- a/src/client/views/collections/TreeView.tsx
+++ b/src/client/views/collections/TreeView.tsx
@@ -201,12 +201,10 @@ export class TreeView extends React.Component<TreeViewProps> {
         if (!docView) {
             this._editTitle = false;
         } else if (docView.isSelected()) {
-            const doc = docView.Document;
-            SelectionManager.SelectSchemaViewDoc(doc);
             this._editTitle = true;
             this._disposers.selection = reaction(
-                () => SelectionManager.SelectedSchemaDoc(),
-                seldoc => seldoc !== doc && this.setEditTitle(undefined)
+                () => docView.isSelected(),
+                isSel => !isSel && this.setEditTitle(undefined)
             );
         } else {
             docView.select(false);
-- 
cgit v1.2.3-70-g09d2

