]> 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>
Tue, 15 Oct 2019 15:10:48 +0000 (18:10 +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 ae937d3459ce190c9bd4c32ec68813c1edc1a88e..0dde98c1cd3e6756726da8dd72d136848cef31d9 100644 (file)
@@ -726,6 +726,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();