diff options
author | bob <bcz@cs.brown.edu> | 2019-06-12 10:32:45 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-06-12 10:32:45 -0400 |
commit | a638c12cde39a3ea5193a8038f72a55d706d9af8 (patch) | |
tree | 1c1c753f33326d9ce11e98b158e416f7991987e5 /src/client/util/SelectionManager.ts | |
parent | b0390a9d3e9201a16e06cf46196688026f949d9f (diff) |
a bunch of cleanup and fixes to formattedtextbox & mainoverlaytextbox
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r-- | src/client/util/SelectionManager.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index b26032b04..09bccb1a0 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -12,11 +12,11 @@ export namespace SelectionManager { @action SelectDoc(docView: DocumentView, ctrlPressed: boolean): void { // if doc is not in SelectedDocuments, add it - if (!ctrlPressed) { - this.DeselectAll(); - } - if (manager.SelectedDocuments.indexOf(docView) === -1) { + if (!ctrlPressed) { + this.DeselectAll(); + } + manager.SelectedDocuments.push(docView); docView.props.whenActiveChanged(true); } |