Closed FigBug closed 9 months ago
Trying this out locally, I triggered an assert on inspector_component:194
jassert (selectComponentCallback);
and then pushing through that, things crashed in MessageManager::runDispatchLoop()
It seems like setRoot
(which calls ensureTreeIsConstructed
) is being called before the callbacks are setup.
It happens when i click my button to construct:
inspector = std::make_unique<melatonin::Inspector> (*this);
inspector->onClose = [this]() { inspector.reset(); };
Looks like bool inspectorEnabled
is never initialized. So this error occurs if it is randomly initialized to 'true'. Setting it to false resolves the issue.
Add
Inspector::setRoot
so the component that is being inspected can change. Optionally, the component being inspected can be whatever top level juce component is under the mouse.