1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSet_WidgetShapeSelector.cpp
4 // Created: 27 Nov 2014
5 // Author: Vitaly Smetannikov
7 #include "PartSet_WidgetConstraintShapeSelector.h"
9 #include <ModelAPI_Session.h>
10 #include <ModelAPI_Validator.h>
12 #include <PartSet_Tools.h>
13 #include <SketchPlugin_Feature.h>
15 bool PartSet_WidgetConstraintShapeSelector::setObject(ObjectPtr theSelectedObject, GeomShapePtr theShape)
17 // initially the method is wrote to create an external object. Since the parent widget creates it,
18 // the redefinition is not necessary anymore.
19 // TODO: remove the widget and use the parent one insted of it
20 return PartSet_WidgetShapeSelector::setObject(theSelectedObject, theShape);
21 /*ObjectPtr aSelectedObject = theSelectedObject;
23 FeaturePtr aFeature = ModelAPI_Feature::feature(aSelectedObject);
25 std::shared_ptr<SketchPlugin_Feature> aSPFeature =
26 std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
27 if ((!aSPFeature) && (!theShape->isNull())) {
28 createExternal(theSelectedObject, theShape);
30 if (myExternalObject) {
31 aSelectedObject = myExternalObject;
36 return ModuleBase_WidgetShapeSelector::setObject(aSelectedObject, theShape);*/