PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
if (thePart) {
DocumentPtr aFeaDoc;
- if (thePart->data()) {
+ if (!XGUI_Tools::isModelObject(thePart)) {
aFeaDoc = thePart->data()->docRef("PartDocument")->value();
} else {
ObjectPtr aObject = boost::dynamic_pointer_cast<ModelAPI_Object>(thePart);
activatePart(FeaturePtr());
else if (theId == "DELETE_CMD")
deleteFeatures(aFeatures);
+ else if (theId == "SHOW_CMD")
+ showFeatures(aFeatures, true);
+ else if (theId == "HIDE_CMD")
+ showFeatures(aFeatures, false);
}
//**************************************************************
foreach (FeaturePtr aFeature, theList) {
if (aFeature->getKind() == "Part") {
DocumentPtr aDoc;
- if (aFeature->data()) {
+ if (!XGUI_Tools::isModelObject(aFeature)) {
aDoc = aFeature->data()->docRef("PartDocument")->value();
} else {
ObjectPtr aObject = boost::dynamic_pointer_cast<ModelAPI_Object>(aFeature);
aDoc->close();
}
} else {
- if (!aFeature->data()) {
+ if (XGUI_Tools::isModelObject(aFeature)) {
ObjectPtr aObject = boost::dynamic_pointer_cast<ModelAPI_Object>(aFeature);
aFeature = aObject->featureRef();
}
aMgr->rootDocument()->finishOperation();
}
}
+
+//**************************************************************
+void XGUI_Workshop::showFeatures(QFeatureList theList, bool isVisible)
+{
+// foreach (FeaturePtr aFeature, theList) {
+// }
+}