From: nds Date: Mon, 25 Apr 2016 07:51:06 +0000 (+0300) Subject: Issue #1393 Angle constraint : incorrect angle displayed: it seems to use auxiliary... X-Git-Tag: V_2.3.0~115 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=53ebc781118080f1821fbfa894876315cd13a2ec;p=modules%2Fshaper.git Issue #1393 Angle constraint : incorrect angle displayed: it seems to use auxiliary line's with equal to 2 in order to see it when dimensions are build. (It is not possible to look at the parameter of the angle presentation when AIS over the line) --- diff --git a/src/ModuleBase/ModuleBase_ModelWidget.cpp b/src/ModuleBase/ModuleBase_ModelWidget.cpp index cf6721992..8a85cd6f4 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.cpp +++ b/src/ModuleBase/ModuleBase_ModelWidget.cpp @@ -87,7 +87,7 @@ QString ModuleBase_ModelWidget::getValueStateError() const return anError; } -QString ModuleBase_ModelWidget::getError() const +QString ModuleBase_ModelWidget::getError(const bool theValueStateChecked) const { QString anError; @@ -110,7 +110,7 @@ QString ModuleBase_ModelWidget::getError() const } anError = QString::fromStdString(anErrorMsg); - if (anError.isEmpty()) + if (anError.isEmpty() && theValueStateChecked) anError = getValueStateError(); return anError; diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index 6face1021..9fe99e4f2 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -98,8 +98,9 @@ Q_OBJECT //! Returns the widget error, get it from the attribute validator and state of the widget //! If the feature is correct, it returns an empty value + //! \param theValueStateChecked the boolean flag if the state of the widget should be checked //! \return string value - QString getError() const; + QString getError(const bool theValueStateChecked = true) const; /// Set the given wrapped value to the current widget /// This value should be processed in the widget according to the needs diff --git a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp index 53295b3cc..427efc273 100644 --- a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp +++ b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp @@ -128,7 +128,7 @@ void PartSet_WidgetPoint2dDistance::onMouseRelease(ModuleBase_IViewWindow* theWn setPoint(feature(), aPnt); // if the validator of the control returns false, focus should not be switched - if (getError().isEmpty()) + if (getError(false).isEmpty()) emit focusOutWidget(this); } diff --git a/src/SketchPlugin/SketchPlugin_SketchEntity.h b/src/SketchPlugin/SketchPlugin_SketchEntity.h index 864b25b41..8662602b6 100644 --- a/src/SketchPlugin/SketchPlugin_SketchEntity.h +++ b/src/SketchPlugin/SketchPlugin_SketchEntity.h @@ -57,7 +57,7 @@ class SketchPlugin_SketchEntity : public SketchPlugin_Feature, public GeomAPI_IC /// Width of the auxiliary line inline static const double SKETCH_LINE_WIDTH_AUXILIARY() { - return 1; + return 2; } /// Width of the line