]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix crash on the selection of external object when creating B-spline
authorazv <azv@opencascade.com>
Mon, 27 Jan 2020 13:56:28 +0000 (16:56 +0300)
committerazv <azv@opencascade.com>
Mon, 27 Jan 2020 13:56:28 +0000 (16:56 +0300)
src/PartSet/PartSet_WidgetBSplinePoints.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp

index 5ccc381e167f70de6e12d902a48a210d82d42bce..0678e82772159d99cc96d9894a5e72d9dcd551f2 100644 (file)
@@ -533,11 +533,7 @@ void PartSet_WidgetBSplinePoints::mouseReleased(ModuleBase_IViewWindow* theWindo
   }
 
   GeomPnt2dPtr aSelectedPoint = PartSet_Tools::getPnt2d(aView, aSelectedShape, mySketch);
-  if (aSelectedPoint) {
-    // nullify selected object to add reference to attribute instead of its owner
-    aSelectedObject = ObjectPtr();
-  }
-  else {
+  if (!aSelectedPoint) {
     aSelectedPoint = PartSet_Tools::getPnt2d(theEvent, theWindow, mySketch);
     setValueState(Stored); // in case of edge selection, Apply state should also be updated
   }
index 2605ddf931a8b2a6ed5785ccb51a5de733e04c5c..7f936524c083487d9dac8719243404b4d14ce5b3 100644 (file)
@@ -576,8 +576,8 @@ double* PlaneGCSSolver_Storage::createParameter()
 void PlaneGCSSolver_Storage::removeParameters(const GCS::SET_pD& theParams)
 {
   mySketchSolver->removeParameters(theParams);
-  for (GCS::SET_pD::iterator it = theParams.begin(); it != theParams.end(); ++it)
-    delete *it;
+  //for (GCS::SET_pD::iterator it = theParams.begin(); it != theParams.end(); ++it)
+  //  delete *it;
 }
 
 // indicates attribute containing in the external feature