else if (theId == "SHOW_CMD") {
showObjects(aObjects, true);
mySelector->updateSelectionBy(ModuleBase_ISelection::Browser);
+ updateCommandStatus();
}
- else if (theId == "HIDE_CMD")
+ else if (theId == "HIDE_CMD") {
showObjects(aObjects, false);
+ updateCommandStatus();
+ }
else if (theId == "SHOW_ONLY_CMD") {
showOnlyObjects(aObjects);
mySelector->updateSelectionBy(ModuleBase_ISelection::Browser);
+ updateCommandStatus();
}
else if (theId == "SHADING_CMD")
setDisplayMode(aObjects, XGUI_Displayer::Shading);
aObj->setDisplayed(false);
}
Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
+ updateCommandStatus();
} else if (theId == "SELECT_VERTEX_CMD") {
setViewerSelectionMode(TopAbs_VERTEX);
} else if (theId == "SELECT_EDGE_CMD") {
void XGUI_Workshop::showObjects(const QObjectPtrList& theList, bool isVisible)
{
foreach (ObjectPtr aObj, theList) {
- /*
- ResultPartPtr aPartRes = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObj);
- if (aPartRes) {
- DocumentPtr aDoc = aPartRes->partDoc();
- SET_DISPLAY_GROUP(ModelAPI_ResultBody::group(), isVisible)
- SET_DISPLAY_GROUP(ModelAPI_ResultConstruction::group(), isVisible)
- SET_DISPLAY_GROUP(ModelAPI_ResultGroup::group(), isVisible)
- } else {
- */
- aObj->setDisplayed(isVisible);
- //}
+ aObj->setDisplayed(isVisible);
}
Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
}
// Show only objects from the list
foreach (ObjectPtr aObj, theList) {
- /*
- ResultPartPtr aPartRes = std::dynamic_pointer_cast<ModelAPI_ResultPart>(aObj);
- if (aPartRes) {
- DocumentPtr aDoc = aPartRes->partDoc();
- SET_DISPLAY_GROUP(ModelAPI_ResultBody::group(), true)
- SET_DISPLAY_GROUP(ModelAPI_ResultConstruction::group(), true)
- SET_DISPLAY_GROUP(ModelAPI_ResultGroup::group(), true)
- } else {
- */
- aObj->setDisplayed(true);
- //}
+ aObj->setDisplayed(true);
}
Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
-
}