From ab658feb8d5a0a2c7eb2bd213bff227b7accb23a Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 26 Feb 2024 14:45:02 -0500
Subject: fixed tooltips to not grab events - this made moving down a menu a
 problem since the tooltip blocked the next menu item and wouldn't give the
 hover event to the next menu item.  fixed proto_embeddings to update when
 lassoing a collection in marqueeView which made showContexts in property view
 do the right thing.

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

(limited to 'src/client/views/PropertiesDocContextSelector.tsx')

diff --git a/src/client/views/PropertiesDocContextSelector.tsx b/src/client/views/PropertiesDocContextSelector.tsx
index 361451c4d..b8bbde9de 100644
--- a/src/client/views/PropertiesDocContextSelector.tsx
+++ b/src/client/views/PropertiesDocContextSelector.tsx
@@ -30,12 +30,12 @@ export class PropertiesDocContextSelector extends ObservableReactComponent<Prope
         const targetContext = this._props.DocView.containerViewPath?.().lastElement()?.Document;
         const embeddings = Doc.GetEmbeddings(target);
         const containerProtos = embeddings.filter(embedding => embedding.embedContainer && embedding.embedContainer instanceof Doc).reduce((set, embedding) => set.add(Cast(embedding.embedContainer, Doc, null)), new Set<Doc>());
-        const containerSets = Array.from(containerProtos.keys()).map(container => Doc.GetEmbeddings(container));
+        const containerSets = Array.from(containerProtos.keys()).map(container => (Doc.GetEmbeddings(container).length ? Doc.GetEmbeddings(container) : [container]));
         const containers = containerSets.reduce((p, set) => {
             set.map(s => p.add(s));
             return p;
         }, new Set<Doc>());
-        const doclayoutSets = Array.from(containers.keys()).map(dp => Doc.GetEmbeddings(dp));
+        const doclayoutSets = Array.from(containers.keys()).map(dp => (Doc.GetEmbeddings(dp).length ? Doc.GetEmbeddings(dp) : [dp]));
         const doclayouts = Array.from(
             doclayoutSets
                 .reduce((p, set) => {
-- 
cgit v1.2.3-70-g09d2

