From: vsv Date: Fri, 3 Oct 2014 12:17:18 +0000 (+0400) Subject: Merge branch 'master' of newgeom:newgeom X-Git-Tag: V_0.5~119 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=12866ad4430e2c7b4fe186d7117291e7aa09a18e;p=modules%2Fshaper.git Merge branch 'master' of newgeom:newgeom Conflicts: src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp src/PartSet/PartSet_OperationFeatureBase.cpp --- 12866ad4430e2c7b4fe186d7117291e7aa09a18e diff --cc src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index 36c1efd1a,fa05bba82..a5e09fea3 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@@ -3,9 -3,8 +3,10 @@@ // Author: Vitaly Smetannikov #include "ModuleBase_WidgetShapeSelector.h" - #include "ModuleBase_IWorkshop.h" + #include +#include "ModuleBase_WidgetValue.h" + #include +#include "ModuleBase_WidgetValueFeature.h" #include #include diff --cc src/PartSet/PartSet_OperationFeatureBase.cpp index a3eacd024,d722998f8..3e0c412ec --- a/src/PartSet/PartSet_OperationFeatureBase.cpp +++ b/src/PartSet/PartSet_OperationFeatureBase.cpp @@@ -101,12 -113,48 +101,10 @@@ void PartSet_OperationFeatureBase::mous commit(); } - - -void PartSet_OperationFeatureBase::onWidgetActivated(ModuleBase_ModelWidget* theWidget) +/*bool PartSet_OperationFeatureBase::setWidgetValue(ObjectPtr theFeature, double theX, double theY) { - if(myActiveWidget) { - myActiveWidget->setHighlighted(false); - } - if(theWidget) { - theWidget->setHighlighted(true); - } - - myActiveWidget = theWidget; - activateByPreselection(); - if (myInitFeature && myActiveWidget) { - ModuleBase_WidgetPoint2D* aWgt = dynamic_cast(myActiveWidget); - if (aWgt && aWgt->initFromPrevious(myInitFeature)) { - myInitFeature = FeaturePtr(); - emit activateNextWidget(myActiveWidget); - } - } -} - -void PartSet_OperationFeatureBase::activateByPreselection() -{ - if ((myPreSelection.size() > 0) && myActiveWidget) { - const ModuleBase_ViewerPrs& aPrs = myPreSelection.front(); - ModuleBase_WidgetValueFeature aValue; - aValue.setObject(aPrs.object()); - if (myActiveWidget->setValue(&aValue)) { - myPreSelection.remove(aPrs); - if(isValid()) { - myActiveWidget = NULL; - commit(); - } else { - emit activateNextWidget(myActiveWidget); - } - } - // If preselection is enough to make a valid feature - apply it immediately - } -} - -bool PartSet_OperationFeatureBase::setWidgetValue(ObjectPtr theFeature, double theX, double theY) -{ - if (!myActiveWidget) + ModuleBase_ModelWidget* aActiveWgt = myPropertyPanel->activeWidget(); + if (!aActiveWgt) return false; ModuleBase_WidgetValueFeature* aValue = new ModuleBase_WidgetValueFeature(); aValue->setObject(theFeature);