From: nds Date: Mon, 28 Mar 2016 07:32:45 +0000 (+0300) Subject: Issue #1343 Improvement of Extrusion and Revolution operations: extrusion by preselection X-Git-Tag: V_2.3.0~318 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ed29adc31b575ff7352f50a2c339c354fd5b4edf;p=modules%2Fshaper.git Issue #1343 Improvement of Extrusion and Revolution operations: extrusion by preselection --- diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.cpp b/src/ModuleBase/ModuleBase_WidgetSelector.cpp index 9d5b50a0a..5443629a8 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelector.cpp @@ -46,9 +46,7 @@ void ModuleBase_WidgetSelector::onSelectionChanged() { QList aSelected = getFilteredSelected(); bool isDone = setSelection(aSelected, true/*false*/); - - if (isDone) - updateOnSelectionChanged(isDone); + updateOnSelectionChanged(isDone); } //******************************************************************** diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.h b/src/ModuleBase/ModuleBase_WidgetSelector.h index ec1dbfbee..2099b0e99 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetSelector.h @@ -58,7 +58,7 @@ Q_OBJECT /// The methiod called when widget is deactivated virtual void deactivate(); -private slots: +protected slots: /// Slot which is called on selection event virtual void onSelectionChanged(); diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index 5ac2cec98..b5b7e8b21 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -268,6 +268,13 @@ bool PartSet_WidgetSketchCreator::setSelection(QList& theV return aDone; } +//******************************************************************** +void PartSet_WidgetSketchCreator::onSelectionChanged() +{ + QList aSelected = getFilteredSelected(); + bool isDone = setSelection(aSelected, true/*false*/); +} + //******************************************************************** void PartSet_WidgetSketchCreator::updateOnSelectionChanged(const bool theDone) { diff --git a/src/PartSet/PartSet_WidgetSketchCreator.h b/src/PartSet/PartSet_WidgetSketchCreator.h index a9a479edd..a229fda23 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.h +++ b/src/PartSet/PartSet_WidgetSketchCreator.h @@ -91,6 +91,10 @@ protected: /// \param theDone a state whether the selection is set void updateOnSelectionChanged(const bool theDone); +protected slots: + /// Slot which is called on selection event + virtual void onSelectionChanged(); + private: /// Returns true if the selection mode is active. This is when composition feature has no /// a sub-object and the attribute list is empty