Code improvement, it renames storeAttributeValues to setObject.
}
//********************************************************************
-bool ModuleBase_WidgetShapeSelector::storeAttributeValues(ObjectPtr theSelectedObject,
- GeomShapePtr theShape)
+bool ModuleBase_WidgetShapeSelector::setObject(ObjectPtr theSelectedObject,
+ GeomShapePtr theShape)
{
bool isChanged = false;
FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(theSelectedObject);
DataPtr aData = myFeature->data();
AttributePtr anAttribute = myFeature->attribute(attributeID());
- storeAttributeValues(myObject, myShape);
+ setObject(myObject, myShape);
AttributeRefAttrPtr aRefAttr = aData->refattr(attributeID());
if (aRefAttr) {
if (!myIsObject)
if (!acceptSubShape(aShape))
return false;
- storeAttributeValues(aObject, aShape);
+ setObject(aObject, aShape);
return true;
}
/// the specific type and set the given values
/// \param theSelectedObject an object
/// \param theShape a selected shape, which is used in the selection attribute
- virtual bool storeAttributeValues(ObjectPtr theSelectedObject, GeomShapePtr theShape);
+ /// \return true if it is succeed
+ virtual bool setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape);
//----------- Class members -------------
protected:
#include <PartSet_Tools.h>
#include <SketchPlugin_Feature.h>
-bool PartSet_WidgetConstraintShapeSelector::storeAttributeValues(ObjectPtr theSelectedObject, GeomShapePtr theShape)
+bool PartSet_WidgetConstraintShapeSelector::setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape)
{
ObjectPtr aSelectedObject = theSelectedObject;
return false;
}
}
- return ModuleBase_WidgetShapeSelector::storeAttributeValues(aSelectedObject, theShape);
+ return ModuleBase_WidgetShapeSelector::setObject(aSelectedObject, theShape);
}
/// the specific type and set the given values
/// \param theSelectedObject an object
/// \param theShape a selected shape, which is used in the selection attribute
- virtual bool storeAttributeValues(ObjectPtr theSelectedObject, GeomShapePtr theShape);
+ virtual bool setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape);
//private:
/// Pointer to a sketch
#include <XGUI_Workshop.h>
#include <XGUI_Displayer.h>
-bool PartSet_WidgetShapeSelector::storeAttributeValues(ObjectPtr theSelectedObject, GeomShapePtr theShape)
+bool PartSet_WidgetShapeSelector::setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape)
{
ObjectPtr aSelectedObject = theSelectedObject;
GeomShapePtr aShape = theShape;
}
}
}
- return ModuleBase_WidgetShapeSelector::storeAttributeValues(aSelectedObject, aShape);
+ return ModuleBase_WidgetShapeSelector::setObject(aSelectedObject, aShape);
}
//********************************************************************
/// the specific type and set the given values
/// \param theSelectedObject an object
/// \param theShape a selected shape, which is used in the selection attribute
- virtual bool storeAttributeValues(ObjectPtr theSelectedObject, GeomShapePtr theShape);
+ virtual bool setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape);
/// Creates a backup of the current values of the attribute
/// It should be realized in the specific widget because of different