]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge remote-tracking branch 'remotes/origin/occ/eliminateWarnings'
authorArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Mon, 18 May 2020 03:23:20 +0000 (06:23 +0300)
committerArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Mon, 18 May 2020 03:27:00 +0000 (06:27 +0300)
1  2 
src/Model/Model_Update.cpp
src/ModuleBase/ModuleBase_ParamSpinBox.cpp
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/SketchPlugin/SketchPlugin_Validators.cpp
src/XGUI/XGUI_ModuleConnector.cpp
src/XGUI/XGUI_Workshop.cpp

Simple merge
index df0124eb8006000801a0da071cf57b1c93e5c42f,a076560ada3a4e099a2183e85da3e77982f0b7af..234a7699d3097e8013fd3e31e789a7d141876d1e
@@@ -531,41 -514,39 +526,41 @@@ bool PartSet_WidgetSketchLabel::fillSke
      isOwnerSet = aDir.get();
    }
    if (thePrs->object() && (feature() != thePrs->object())) {
 -    FeaturePtr aFeature = ModelAPI_Feature::feature(thePrs->object());
 -    DataPtr aData = feature()->data();
 -    AttributeSelectionPtr aSelAttr =
 -      std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
 -      (aData->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID()));
 -    if (aSelAttr.get()) {
 -      ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(thePrs->object());
 -      if (aRes.get()) {
 -        GeomShapePtr aShapePtr;
 -        if (!aShape.get() || aShape->isNull()) {  // selection happens in the OCC viewer
 -          aShapePtr = ModelAPI_Tools::shape(aRes);
 -        }
 -        else { // selection happens in OB browser
 -          aShapePtr = aShape;
 -        }
 -        if (aShapePtr.get() && aShapePtr->isFace()) {
 -          const TopoDS_Shape& aTDShape = aShapePtr->impl<TopoDS_Shape>();
 -          setSketchPlane(aTDShape);
 -          aSelAttr->setValue(aRes, aShapePtr);
 -          isOwnerSet = true;
 -        }
 -      }
 -      else {
 -        aSelAttr->setValue(aFeature, GeomShapePtr());
 -        GeomShapePtr aSelShape = aSelAttr->value();
 -        if (!aSelShape.get() && aSelAttr->contextFeature().get() &&
 -          aSelAttr->contextFeature()->firstResult().get()) {
 -          aSelShape = aSelAttr->contextFeature()->firstResult()->shape();
 +    if (thePrs->object()->groupName() != ModelAPI_ResultConstruction::group()) {
 +      FeaturePtr aFeature = ModelAPI_Feature::feature(thePrs->object());
 +      DataPtr aData = feature()->data();
 +      AttributeSelectionPtr aSelAttr =
 +        std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
 +        (aData->attribute(SketchPlugin_SketchEntity::EXTERNAL_ID()));
 +      if (aSelAttr.get()) {
 +        ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(thePrs->object());
 +        if (aRes.get()) {
 +          GeomShapePtr aShapePtr;
 +          if (!aShape.get() || aShape->isNull()) {  // selection happens in the OCC viewer
 +            aShapePtr = ModelAPI_Tools::shape(aRes);
 +          }
 +          else { // selection happens in OB browser
 +            aShapePtr = aShape;
 +          }
 +          if (aShapePtr.get() && aShapePtr->isFace()) {
 +            const TopoDS_Shape& aTDShape = aShapePtr->impl<TopoDS_Shape>();
 +            setSketchPlane(aTDShape);
 +            aSelAttr->setValue(aRes, aShapePtr);
 +            isOwnerSet = true;
 +          }
          }
 -        if (aSelShape.get() && aSelShape->isPlanar()) {
 -          const TopoDS_Shape& aTDShape = aSelShape->impl<TopoDS_Shape>();
 -          setSketchPlane(aTDShape);
 -          isOwnerSet = true;
 +        else {
 +          aSelAttr->setValue(aFeature, GeomShapePtr());
-           GeomShapePtr aShape = aSelAttr->value();
-           if (!aShape.get() && aSelAttr->contextFeature().get() &&
++          GeomShapePtr aSelShape = aSelAttr->value();
++          if (!aSelShape.get() && aSelAttr->contextFeature().get() &&
 +            aSelAttr->contextFeature()->firstResult().get()) {
-             aShape = aSelAttr->contextFeature()->firstResult()->shape();
++            aSelShape = aSelAttr->contextFeature()->firstResult()->shape();
 +          }
-           if (aShape.get() && aShape->isPlanar()) {
-             const TopoDS_Shape& aTDShape = aShape->impl<TopoDS_Shape>();
++          if (aSelShape.get() && aSelShape->isPlanar()) {
++            const TopoDS_Shape& aTDShape = aSelShape->impl<TopoDS_Shape>();
 +            setSketchPlane(aTDShape);
 +            isOwnerSet = true;
 +          }
          }
        }
      }
Simple merge
Simple merge