diff options
author | bobzel <zzzman@gmail.com> | 2023-04-17 11:18:37 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-04-17 11:18:37 -0400 |
commit | 4c803d0556aec2e06387a86cc84069577bebd5c9 (patch) | |
tree | b90cf1dea76f51e273e9c11f9084cf6ce02b9f77 /src/client/util/SelectionManager.ts | |
parent | cd30c14116bbbab16c21a7ecc31090d2b4bf413f (diff) | |
parent | 8127616d06b4db2b29de0b13068810fd19e77b5e (diff) |
Merge branch 'master' into pres-trail-sophie
Diffstat (limited to 'src/client/util/SelectionManager.ts')
-rw-r--r-- | src/client/util/SelectionManager.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts index 313c255a0..bfad93334 100644 --- a/src/client/util/SelectionManager.ts +++ b/src/client/util/SelectionManager.ts @@ -1,4 +1,3 @@ -import { ModalManager } from '@material-ui/core'; import { action, observable, ObservableMap } from 'mobx'; import { computedFn } from 'mobx-utils'; import { Doc, Opt } from '../../fields/Doc'; @@ -64,8 +63,9 @@ export namespace SelectionManager { export function DeselectView(docView?: DocumentView): void { manager.DeselectView(docView); } - export function SelectView(docView: DocumentView, ctrlPressed: boolean): void { - manager.SelectView(docView, ctrlPressed); + export function SelectView(docView: DocumentView | undefined, ctrlPressed: boolean): void { + if (!docView) DeselectAll(); + else manager.SelectView(docView, ctrlPressed); } export function SelectSchemaViewDoc(document: Opt<Doc>, deselectAllFirst?: boolean): void { if (deselectAllFirst) manager.DeselectAll(); |