ObjectPtr aObject = aObjects.first();
if (aObject) {
if (!hasFeature) {
- if (aDisplayer->isVisible(aObject)) {
+ if (aObject->isDisplayed()) {
if (aDisplayer->canBeShaded(aObject)) {
if (aDisplayer->displayMode(aObject) == XGUI_Displayer::Shading)
aMenu->addAction(action("WIREFRAME_CMD"));
} else if (hasResult && (!hasParameter)) {
aMenu->addAction(action("SHOW_CMD"));
}
+
+ ResultPartPtr aPartRes = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObject);
+ if (aPartRes) {
+ aMenu->addAction(action("SHOW_CMD"));
+ }
+
if (!(hasParameter || hasFeature))
aMenu->addAction(action("SHOW_ONLY_CMD"));
}
foreach(ObjectPtr aObject, aObjects)
{
ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObject);
- if (aRes && myWorkshop->displayer()->isVisible(aRes)) {
+ if (aRes && aRes->isDisplayed()) {
isVisible = true;
canBeShaded = myWorkshop->displayer()->canBeShaded(aObject);
isShading = (myWorkshop->displayer()->displayMode(aObject) == XGUI_Displayer::Shading);