bool aBodyIsVisualized = myPreviewPlanes->hasVisualizedBodies(myWorkshop);
// Clear previous selection mode It is necessary for correct activation of preview planes
- aDisp->activateObjects(QIntList(), aDisplayed, false);
+ XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myWorkshop);
+ XGUI_Displayer* aDisp = aWorkshop->displayer();
+ aDisp->activateObjects(QIntList(), aDisp->displayedObjects(), false);
if (!aBodyIsVisualized) {
// We have to select a plane before any operation
const std::list<std::shared_ptr<ModelAPI_Result>> aResList = aFeature->results();
std::list<ResultPtr>::const_iterator aIt;
for (aIt = aResList.cbegin(); aIt != aResList.cend(); ++aIt) {
- aSelectedPrs.append(ModuleBase_ViewerPrs((*aIt), TopoDS_Shape(), NULL));
+ aSelectedPrs.append(ModuleBase_ViewerPrs((*aIt), GeomShapePtr(), NULL));
}
}
}