From: nds Date: Tue, 22 Mar 2016 14:20:06 +0000 (+0300) Subject: Issue #1343 Improvement of Extrusion and Revolution operations: preview planes should... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=18459e203667438eeffb22a3cb60300f163b31f2;p=modules%2Fshaper.git Issue #1343 Improvement of Extrusion and Revolution operations: preview planes should be erased by operation abort. --- diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index 52e518297..bd70b0f0a 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -140,7 +140,7 @@ void PartSet_WidgetSketchCreator::setVisibleSelectionControl(const bool theSelec } } else { bool aHidePreview = myPreviewPlanes->isPreviewDisplayed(); - myPreviewPlanes->showPreviewPlanes(myWorkshop); + myPreviewPlanes->erasePreviewPlanes(myWorkshop); if (aHidePreview) aWorkshop->viewer()->update(); } @@ -262,7 +262,9 @@ bool PartSet_WidgetSketchCreator::focusTo() // we need to call activate here as the widget has no focus accepted controls // if these controls are added here, activate will happens automatically after focusIn() - activateCustom(); + XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myModule->workshop()); + XGUI_PropertyPanel* aPanel = aWorkshop->propertyPanel(); + aPanel->activateWidget(this, false); return true; } else { @@ -281,6 +283,17 @@ bool PartSet_WidgetSketchCreator::focusTo() return false; } +void PartSet_WidgetSketchCreator::deactivate() +{ + ModuleBase_WidgetSelector::deactivate(); + + bool aHidePreview = myPreviewPlanes->isPreviewDisplayed(); + myPreviewPlanes->erasePreviewPlanes(myWorkshop); + if (aHidePreview) + XGUI_Tools::workshop(myWorkshop)->viewer()->update(); + +} + void PartSet_WidgetSketchCreator::onResumed(ModuleBase_Operation* theOp) { CompositeFeaturePtr aCompFeature = diff --git a/src/PartSet/PartSet_WidgetSketchCreator.h b/src/PartSet/PartSet_WidgetSketchCreator.h index 011608ef0..e0e6276e5 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.h +++ b/src/PartSet/PartSet_WidgetSketchCreator.h @@ -47,6 +47,9 @@ public: /// \return the state whether the widget can accept the focus virtual bool focusTo(); + /// The methiod called when widget is deactivated + virtual void deactivate(); + /// Editing mode depends on mode of current operation. This value is defined by it. virtual void setEditingMode(bool isEditing);