From aae329c9a0a8484cff7dc26bea6e6386b21bcc7b Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 28 Mar 2016 10:32:45 +0300 Subject: [PATCH] Issue #1343 Improvement of Extrusion and Revolution operations: extrusion by preselection --- src/ModuleBase/ModuleBase_WidgetSelector.cpp | 4 +--- src/ModuleBase/ModuleBase_WidgetSelector.h | 2 +- src/PartSet/PartSet_WidgetSketchCreator.cpp | 7 +++++++ src/PartSet/PartSet_WidgetSketchCreator.h | 4 ++++ 4 files changed, 13 insertions(+), 4 deletions(-) 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 -- 2.39.2