Assembly: Fix "deactivated by activating a App::Part, assembly stay in edit"

Fix "Activating a body in a part in an assembly deactivates the assembly and activate the part"
Fix "A manually deactivated assembly is still restoring later"
This commit is contained in:
paddle
2026-01-22 14:21:28 +01:00
committed by PaddleStroke
parent abc5f90466
commit 62cbaf7336
8 changed files with 58 additions and 15 deletions

View File

@@ -187,6 +187,9 @@ void Gui::ActiveObjectList::setObject(
}
if (!obj) {
if (_Doc) {
_Doc->signalActivatedVP(nullptr, name);
}
return;
}
@@ -202,6 +205,11 @@ void Gui::ActiveObjectList::setObject(
_ObjectMap[name] = info;
setHighlight(info, mode, true);
auto vp = freecad_cast<ViewProviderDocumentObject*>(Application::Instance->getViewProvider(obj));
if (vp) {
vp->getDocument()->signalActivatedVP(vp, name);
}
}
bool Gui::ActiveObjectList::hasObject(const char* name) const