X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetShapeSelector.cpp;h=b68e282b69630d35b31d42bb8790a3f5064adf2e;hb=eef14b29d313b9dd16453d12f20aa02383ee139c;hp=27487c72a0c00eddbf73f7565bc328ea2d698e72;hpb=186984f0f222b39b57d31ba267c7bea97686b491;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index 27487c72a..b68e282b6 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -160,13 +160,6 @@ QList ModuleBase_WidgetShapeSelector::getAttributeSelectio return aSelected; } -//******************************************************************** -void ModuleBase_WidgetShapeSelector::clearAttribute() -{ - // In order to make reselection possible, set empty object and shape should be done - setObject(ObjectPtr(), std::shared_ptr(new GeomAPI_Shape())); -} - //******************************************************************** bool ModuleBase_WidgetShapeSelector::restoreValueCustom() { @@ -212,7 +205,10 @@ GeomShapePtr ModuleBase_WidgetShapeSelector::getShape() const if (aType == ModelAPI_AttributeReference::typeId()) { } else if (aType == ModelAPI_AttributeRefAttr::typeId()) { AttributeRefAttrPtr aRefAttr = aData->refattr(attributeID()); - aShape = myWorkshop->module()->findShape(aRefAttr); + if (aRefAttr.get() && !aRefAttr->isObject()) { + AttributePtr anAttribute = aRefAttr->attr(); + aShape = myWorkshop->module()->findShape(anAttribute); + } } else if (aType == ModelAPI_AttributeSelection::typeId()) { AttributeSelectionPtr aSelectAttr = aData->selection(attributeID()); aShape = aSelectAttr->value();