diff options
author | bobzel <zzzman@gmail.com> | 2022-09-22 09:59:00 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-09-22 09:59:00 -0400 |
commit | 13a0c0c505edd4b00f9d7b5aed78237c4d23a3d1 (patch) | |
tree | 89979a0014c8a5eaa222fcf7c609ae888eeca14a /src/fields/Doc.ts | |
parent | d40a8e4506672f9d0ad505409f4b181d73762c28 (diff) |
remove overlaydocs when switching dashboards.
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 74a3d8cf2..a3c742f28 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -239,6 +239,8 @@ export class Doc extends RefField { return DocCast(Doc.UserDoc().activeDashboard); } public static set ActiveDashboard(val: Doc | undefined) { + const overlays = Cast(Doc.MyOverlayDocs.data, listSpec(Doc), null); + overlays && (overlays.length = 0); Doc.UserDoc().activeDashboard = val; } public static set ActiveTool(tool: InkTool) { |