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:
@@ -284,7 +284,11 @@ App::Part* getActivePart()
|
||||
{
|
||||
Gui::MDIView* activeView = Gui::Application::Instance->activeView();
|
||||
if (activeView) {
|
||||
return activeView->getActiveObject<App::Part*>(PARTKEY);
|
||||
auto* obj = activeView->getActiveObject<App::Part*>(PARTKEY);
|
||||
if (!obj) {
|
||||
obj = activeView->getActiveObject<App::Part*>(ASSEMBLYKEY);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
else {
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user