Skip to content

Commit 27392d6

Browse files
committed
Only select components that are under the root's peer
1 parent 9d34786 commit 27392d6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

melatonin_inspector.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,10 @@ namespace melatonin
420420
if (focusedComponent == nullptr)
421421
return;
422422

423-
// This gets sent all components, even subcomponents of the inspector
424-
// (which will result in the selection being cleared).
425-
// I tried filtering those out for cleaner UX,
426-
// but it caused glitchy incorrectness in focus selections
427-
selectComponent (focusedComponent);
423+
// This gets sent all components, even subcomponents of the inspector itself
424+
// (which is undesirable since we're not dogfoodiing).
425+
if (focusedComponent->getPeer() == root->getPeer())
426+
selectComponent (focusedComponent);
428427
}
429428

430429
void timerCallback() override

0 commit comments

Comments
 (0)