From 4d1ca3d12ead93acdc69489ad3d0c05fd1d0e39f Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 5 Mar 2015 15:09:04 +0300 Subject: [PATCH] Construction elements are auxiliary entities: The regression: contour is not closed. We need to check whether there is at least one obligatory left widgets. --- src/PartSet/PartSet_Module.cpp | 12 ++++++------ src/XGUI/XGUI_Displayer.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 6758f5722..68a69ad97 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -435,14 +435,14 @@ void PartSet_Module::onVertexSelected() const QList& aWidgets = aPanel->modelWidgets(); QList::const_iterator anIt = aWidgets.begin(), aLast = aWidgets.end(); bool aFoundWidget = false; - bool aFoundNonObligatory = false; - for (; anIt != aLast && !aFoundNonObligatory; anIt++) { - aFoundWidget = aFoundWidget || *anIt == anActiveWidget; + bool aFoundObligatory = false; + for (; anIt != aLast && !aFoundObligatory; anIt++) { if (!aFoundWidget) - continue; - aFoundNonObligatory = !(*anIt)->isObligatory(); + aFoundWidget = *anIt == anActiveWidget; + else + aFoundObligatory = (*anIt)->isObligatory(); } - if (!aFoundNonObligatory) + if (!aFoundObligatory) myRestartingMode = RM_Forbided; } } diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index 6fc47e170..6135ea32d 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -227,7 +227,7 @@ void XGUI_Displayer::redisplay(ObjectPtr theObject, bool isUpdateViewer) // before and after the values modification. // Moreother, this check avoids customize and redisplay presentation if the presentable // parameter is changed. - /*ResultPtr aResult = std::dynamic_pointer_cast(theObject); + ResultPtr aResult = std::dynamic_pointer_cast(theObject); if (aResult.get() != NULL) { Handle(AIS_Shape) aShapePrs = Handle(AIS_Shape)::DownCast(aAISIO); if (!aShapePrs.IsNull()) { @@ -241,7 +241,7 @@ void XGUI_Displayer::redisplay(ObjectPtr theObject, bool isUpdateViewer) return; } } - }*/ + } // Customization of presentation FeaturePtr aFeature = ModelAPI_Feature::feature(theObject); if (aFeature.get() != NULL) { -- 2.39.2