]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Construction elements are auxiliary entities:
authornds <natalia.donis@opencascade.com>
Thu, 5 Mar 2015 12:09:04 +0000 (15:09 +0300)
committernds <natalia.donis@opencascade.com>
Thu, 5 Mar 2015 12:09:04 +0000 (15:09 +0300)
The regression: contour is not closed. We need to check whether there is at least one obligatory left widgets.

src/PartSet/PartSet_Module.cpp
src/XGUI/XGUI_Displayer.cpp

index 6758f5722532ae092e786d784638e28695cb4b83..68a69ad97c4b7d30a67ee6373f35759cf4769d60 100644 (file)
@@ -435,14 +435,14 @@ void PartSet_Module::onVertexSelected()
     const QList<ModuleBase_ModelWidget*>& aWidgets = aPanel->modelWidgets();
     QList<ModuleBase_ModelWidget*>::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;
   }
 }
index 6fc47e170982976ac55392ddddb624d2b90f9ced..6135ea32d39b0fe1d6d1f9013e6f63d4864c5d7f 100644 (file)
@@ -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<ModelAPI_Result>(theObject);
+    ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(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) {