aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/TreeView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/TreeView.tsx')
-rw-r--r--src/client/views/collections/TreeView.tsx6
1 files changed, 2 insertions, 4 deletions
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);