]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #3041: prevent crash on change sketch plane
authorvsv <vsv@opencascade.com>
Tue, 15 Oct 2019 15:10:48 +0000 (18:10 +0300)
committervsv <vsv@opencascade.com>
Wed, 6 Nov 2019 08:27:31 +0000 (11:27 +0300)
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/SketcherPrs/SketcherPrs_Angle.cpp
src/SketcherPrs/SketcherPrs_LengthDimension.cpp
src/SketcherPrs/SketcherPrs_Radius.cpp
src/SketcherPrs/SketcherPrs_SymbolPrs.cpp

index 548d01d13036e12d2cb6d66ad03761d02e36691f..2ba13e6bd49603d358cc91df161154b9997cddb8 100644 (file)
@@ -734,6 +734,7 @@ void PartSet_WidgetSketchLabel::onChangePlane()
     SessionPtr aMgr = ModelAPI_Session::get();
     aMgr->startOperation("Change Sketch plane");
     myOpenTransaction = true;
+    myWorkshop->viewer()->update();
   }
 }
 
index 3a876982b326ba180bdd58197b333476ed79c396..f5bcf8e3de258adabb2791c2ae02b9090f5b3ed4 100644 (file)
@@ -165,6 +165,8 @@ void SketcherPrs_Angle::Compute(const Handle(PrsMgr_PresentationManager3d)& theP
                                 const Handle(Prs3d_Presentation)& thePresentation,
                                 const Standard_Integer theMode)
 {
+  if (!plane().get())
+    return;
   gp_Pnt aFirstPoint, aSecondPoint, aCenterPoint;
   bool aReadyToDisplay = readyToDisplay(myConstraint, plane(),
                                         aFirstPoint, aSecondPoint, aCenterPoint);
index b895b6d6be67b50f88ae1e4a81f4e24c345ed297..6f1179f59a1263b0c1f8a71b59b6552de8facf51 100644 (file)
@@ -147,6 +147,8 @@ void SketcherPrs_LengthDimension::Compute(
   const Handle(Prs3d_Presentation)& thePresentation,
   const Standard_Integer theMode)
 {
+  if (!plane().get())
+    return;
   gp_Pnt aPnt1, aPnt2;
   bool aReadyToDisplay = readyToDisplay(myConstraint, plane(), aPnt1, aPnt2);
   if (aReadyToDisplay) {
index 8d3355d7752c226a1d93452c584922cfc9d9474c..bd10874fcd469eca67559649a633c3767eaea594 100644 (file)
@@ -145,6 +145,8 @@ void SketcherPrs_Radius::Compute(
   const Handle(Prs3d_Presentation)& thePresentation,
   const Standard_Integer theMode)
 {
+  if (!plane().get())
+    return;
   gp_Circ aCircle;
   gp_Pnt anAnchorPoint;
   bool aReadyToDisplay = readyToDisplay(myConstraint, plane(), aCircle, anAnchorPoint);
index a251d2539f357b9661c0747b1463877e38f25c2d..5f79c5fbaec5d90b5dca3abe513ef441be0c4bf3 100644 (file)
@@ -274,6 +274,8 @@ void SketcherPrs_SymbolPrs::Compute(
                 const Handle(Prs3d_Presentation)& thePresentation,
                 const Standard_Integer theMode)
 {
+  if (!plane().get())
+    return;
   // Create an icon
   prepareAspect();