From: vsv Date: Fri, 27 Jun 2014 07:38:05 +0000 (+0400) Subject: Bugs fixing on constraints with preselected objects X-Git-Tag: V_0.4.4~218 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a0e93f487500aca7d440c6e527867289c486fa32;p=modules%2Fshaper.git Bugs fixing on constraints with preselected objects --- diff --git a/src/ModuleBase/ModuleBase_WidgetFeatureOrAttribute.cpp b/src/ModuleBase/ModuleBase_WidgetFeatureOrAttribute.cpp index 9a47f9231..4ff9ab84b 100644 --- a/src/ModuleBase/ModuleBase_WidgetFeatureOrAttribute.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFeatureOrAttribute.cpp @@ -48,25 +48,26 @@ bool ModuleBase_WidgetFeatureOrAttribute::setValue(ModuleBase_WidgetValue* theVa if (aFeatureValue) { boost::shared_ptr aValuePoint = aFeatureValue->point(); FeaturePtr aValueFeature = aFeatureValue->feature(); - - if (aValueFeature) { - isDone = setFeature(aValueFeature); - } - if (!isDone) { - // find the given point in the feature attributes - std::list > anAttiributes = - aValueFeature->data()->attributes(GeomDataAPI_Point2D::type()); - std::list >::const_iterator anIt = anAttiributes.begin(), - aLast = anAttiributes.end(); - boost::shared_ptr aFPoint; - for (;anIt!=aLast && !aFPoint; anIt++) { - boost::shared_ptr aCurPoint = - boost::dynamic_pointer_cast(*anIt); - if (aCurPoint && aCurPoint->pnt()->distance(aValuePoint) < Precision::Confusion()) - aFPoint = aCurPoint; + if (aValuePoint && aValueFeature) { + if (aValueFeature) { + isDone = setFeature(aValueFeature); + } + if (!isDone) { + // find the given point in the feature attributes + std::list > anAttiributes = + aValueFeature->data()->attributes(GeomDataAPI_Point2D::type()); + std::list >::const_iterator anIt = anAttiributes.begin(), + aLast = anAttiributes.end(); + boost::shared_ptr aFPoint; + for (;anIt!=aLast && !aFPoint; anIt++) { + boost::shared_ptr aCurPoint = + boost::dynamic_pointer_cast(*anIt); + if (aCurPoint && aCurPoint->pnt()->distance(aValuePoint) < Precision::Confusion()) + aFPoint = aCurPoint; + } + if (aFPoint) + isDone = setAttribute(aFPoint); } - if (aFPoint) - isDone = setAttribute(aFPoint); } } } diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 206bbaa5b..65172c482 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -391,8 +391,6 @@ ModuleBase_Operation* PartSet_Module::createOperation(const std::string& theCmdI connect(aPreviewOp, SIGNAL(multiSelectionEnabled(bool)), this, SLOT(onMultiSelectionEnabled(bool))); - connect(aPreviewOp, SIGNAL(multiSelectionEnabled(bool)), - this, SLOT(onMultiSelectionEnabled(bool))); connect(aPreviewOp, SIGNAL(stopSelection(const QFeatureList&, const bool)), this, SLOT(onStopSelection(const QFeatureList&, const bool))); connect(aPreviewOp, SIGNAL(setSelection(const QFeatureList&)),