#include <ModelAPI_Feature.h>
#include <ModelAPI_Data.h>
+#include <ModelAPI_Object.h>
#include <GeomDataAPI_Point2D.h>
#include <QGroupBox>
bool ModuleBase_WidgetPoint2D::storeValue(boost::shared_ptr<ModelAPI_Feature> theFeature)
{
boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
+ if (!aData) {
+ ObjectPtr anObj = boost::dynamic_pointer_cast<ModelAPI_Object>(theFeature);
+ if (anObj) aData = anObj->featureRef()->data();
+ }
boost::shared_ptr<GeomDataAPI_Point2D> aPoint =
boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(myFeatureAttributeID));
bool ModuleBase_WidgetPoint2D::restoreValue(boost::shared_ptr<ModelAPI_Feature> theFeature)
{
boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
+ if (!aData) {
+ ObjectPtr anObj = boost::dynamic_pointer_cast<ModelAPI_Object>(theFeature);
+ if (anObj) aData = anObj->featureRef()->data();
+ }
boost::shared_ptr<GeomDataAPI_Point2D> aPoint =
boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(myFeatureAttributeID));