}
}
// end single selection
- } else { // multiselection
+ } else { // multi-selection
// parameter is commented because the actions are not in the list of result parameter actions
if (hasResult /*&& (!hasParameter)*/) {
action("SHOW_CMD")->setEnabled(true);
action("SHADING_CMD")->setEnabled(true);
action("WIREFRAME_CMD")->setEnabled(true);
}
- } // end multiselection
+ } // end multi-selection
// Check folder management commands state if only features are selected
if ((!hasResult) && hasFeature && (!hasParameter) && (!hasCompositeOwner) &&
}
}
if (aDeactivate) {
- // If at leas a one objec can not be edited then Show/Hide has to be disabled
+ // If at leas a one object can not be edited then Show/Hide has to be disabled
action("SHOW_CMD")->setEnabled(false);
action("HIDE_CMD")->setEnabled(false);
action("SHOW_ONLY_CMD")->setEnabled(false);
std::list<ResultPtr> aResults;
for(QObjectPtrList::const_iterator anIt = anObjects.begin(); anIt != anObjects.end(); anIt++) {
ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(*anIt);
- if (aRes.get() && aRes->data()->isValid() && !aRes->data()->isDeleted())
+ if (aRes.get() && aRes->data()->isValid() && !aRes->data()->isDeleted() &&
+ aRes->groupName() != ModelAPI_ResultGroup::group() && // don't remove groups and fields
+ aRes->groupName() != ModelAPI_ResultField::group()) // because they are badly selected
aResults.push_back(aRes);
}
if (!aResults.empty()) {