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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user