From: vsv Date: Thu, 22 Aug 2019 12:57:26 +0000 (+0300) Subject: Issue #2961: Show selection of planes for sketcher on plane change X-Git-Tag: VEDF2019Lot4~34 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6c9e2ba7a5d4e34759234855ee5ecff6e339d631;p=modules%2Fshaper.git Issue #2961: Show selection of planes for sketcher on plane change --- diff --git a/src/PartSet/PartSet_WidgetSketchLabel.cpp b/src/PartSet/PartSet_WidgetSketchLabel.cpp index 231c512fa..221207f9d 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.cpp +++ b/src/PartSet/PartSet_WidgetSketchLabel.cpp @@ -539,6 +539,12 @@ void PartSet_WidgetSketchLabel::deactivate() if (aHidePreview) myWorkshop->viewer()->update(); + + if (myOpenTransaction) { + SessionPtr aMgr = ModelAPI_Session::get(); + aMgr->finishOperation(); + myOpenTransaction = false; + } } void PartSet_WidgetSketchLabel::selectionModes(int& theModuleSelectionModes, QIntList& theModes) @@ -680,6 +686,13 @@ void PartSet_WidgetSketchLabel::onChangePlane() myRemoveExternal->setVisible(true); myStackWidget->setCurrentIndex(0); + bool aBodyIsVisualized = myPreviewPlanes->hasVisualizedBodies(myWorkshop); + + if (!aBodyIsVisualized) { + // We have to select a plane before any operation + myPreviewPlanes->showPreviewPlanes(myWorkshop); + } + CompositeFeaturePtr aSketch = std::dynamic_pointer_cast(myFeature); PartSet_Tools::nullifySketchPlane(aSketch);