- myPointSelectionMode = theMode;
- if (isToEmitSignal) {
- std::string aName = myFeaturePrs->getAttribute(theMode);
- if (aName.empty() && theMode == SM_DonePoint) {
- aName = XGUI::PROP_PANEL_OK;
- }
- emit focusActivated(aName);
- }
-}*/
-
-bool PartSet_OperationFeatureCreate::isPointWidget() const
-{
- return dynamic_cast<ModuleBase_WidgetPoint2D*>(myActiveWidget);
-}
-
-bool PartSet_OperationFeatureCreate::setWidgetPoint(double theX, double theY)
-{
- boost::shared_ptr<GeomAPI_Pnt2d> aPoint(new GeomAPI_Pnt2d(theX, theY));
- ModuleBase_WidgetPoint2D* aWidget = dynamic_cast<ModuleBase_WidgetPoint2D*>(myActiveWidget);
- if (aWidget) {
- aWidget->setPoint(aPoint);
- return true;
- } else {
- ModuleBase_WidgetPoint2dDistance* aWgt = dynamic_cast<ModuleBase_WidgetPoint2dDistance*>(myActiveWidget);
- if (aWgt) {
- aWgt->setPoint(feature(), aPoint);
- return true;
- }
- }
- return false;
-}
-
-bool PartSet_OperationFeatureCreate::setWidgetFeature(const FeaturePtr& theFeature)
-{
- ModuleBase_WidgetFeature* aWidget = dynamic_cast<ModuleBase_WidgetFeature*>(myActiveWidget);
- if (!aWidget)
- return false;
-
- return aWidget->setFeature(theFeature);
+ ModuleBase_WidgetValueFeature* aValue = new ModuleBase_WidgetValueFeature();
+ aValue->setResult(theFeature->firstResult());
+ aValue->setPoint(boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(theX, theY)));
+ bool isApplyed = myActiveWidget->setValue(aValue);
+
+ delete aValue;
+ myIsModified = (myIsModified || isApplyed);
+ return isApplyed;