]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
authornds <natalia.donis@opencascade.com>
Thu, 16 Apr 2015 17:28:12 +0000 (20:28 +0300)
committernds <natalia.donis@opencascade.com>
Thu, 16 Apr 2015 17:28:12 +0000 (20:28 +0300)
Conflicts:
src/PartSet/PartSet_SketcherMgr.cpp

1  2 
src/PartSet/PartSet_SketcherMgr.cpp

index 3a9487469f07de79def7b3e2e62f6b474d7a7c5a,c3c96f9f4087d8b591f683e0de32ce1fd562634a..2634dd7a3a7b825e9f388080ade8a2c29d3baeb3
@@@ -324,18 -326,17 +326,17 @@@ void PartSet_SketcherMgr::onMousePresse
        get2dPoint(theWnd, theEvent, myCurrentPoint);
        myDragDone = false;
        launchEditing();
-       // Init flyout point for radius rotation
-       FeaturePtr aFeature = myCurrentSelection.begin().key();
-       std::shared_ptr<SketchPlugin_Feature> aSPFeature = 
-                 std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
+       if (aFeature.get() != NULL) {
+         std::shared_ptr<SketchPlugin_Feature> aSPFeature = 
+                   std::dynamic_pointer_cast<SketchPlugin_Feature>(aFeature);
 -        if (aSPFeature->getKind() == SketchPlugin_ConstraintRadius::ID()) {
 +      if (aSPFeature.get() && aSPFeature->getKind() == SketchPlugin_ConstraintRadius::ID()) {
-         DataPtr aData = aSPFeature->data();
-         AttributePtr aAttr = aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT());
-         std::shared_ptr<GeomDataAPI_Point2D> aFPAttr = 
-           std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aAttr);
-         aFPAttr->setValue(myCurrentPoint.myCurX, myCurrentPoint.myCurY);
+           DataPtr aData = aSPFeature->data();
+           AttributePtr aAttr = aData->attribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT());
+           std::shared_ptr<GeomDataAPI_Point2D> aFPAttr = 
+             std::dynamic_pointer_cast<GeomDataAPI_Point2D>(aAttr);
+           aFPAttr->setValue(myCurrentPoint.myCurX, myCurrentPoint.myCurY);
+         }
        }
      } else if (isSketchOpe && isEditing) {
        // If selected another object commit current result
        aOperation->commit();