fix(editing-context): resolve initial context on construction

EditingContextResolver constructor did not call refresh(), leaving
d->current as a default empty EditingContext. When BreadcrumbToolBar
queried currentContext() on creation, it received an empty context
with no breadcrumb segments, causing the navbar to appear blank.

Add refresh() at end of constructor so the initial state is resolved
before any View3DInventor queries it.
This commit is contained in:
forbes
2026-02-28 14:53:44 -06:00
parent 18532e3bd7
commit 1b38d7b24b

View File

@@ -124,6 +124,10 @@ EditingContextResolver::EditingContextResolver()
app.signalActivatedViewProvider.connect(
[this](const ViewProviderDocumentObject*, const char*) { refresh(); }
);
// Resolve the initial context so currentContext() returns a valid state
// before any signals fire (e.g. when BreadcrumbToolBar queries on creation).
refresh();
}
EditingContextResolver::~EditingContextResolver()