From: nds Date: Thu, 21 May 2015 07:24:53 +0000 (+0300) Subject: Code improvement: separate restore selection functionality in an additional method X-Git-Tag: V_1.2.0~127 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ae56990359c40cfa4fa0fc99be2fd7e64c4c0ea3;p=modules%2Fshaper.git Code improvement: separate restore selection functionality in an additional method --- diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index 57c4d06dc..312183b9e 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -109,7 +109,7 @@ void ModuleBase_WidgetMultiSelector::activateCustom() activateShapeSelection(true); // Restore selection in the viewer by the attribute selection list - myWorkshop->setSelected(getCurrentSelection()); + myWorkshop->setSelected(getAttributeSelection()); activateFilters(myWorkshop, true); } @@ -224,6 +224,7 @@ bool ModuleBase_WidgetMultiSelector::setSelection(const QList ModuleBase_WidgetMultiSelector::getCurrentSelection() const +QList ModuleBase_WidgetMultiSelector::getAttributeSelection() const { QList aSelected; // Restore selection in the viewer by the attribute selection list diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h index fe665938f..033b260b4 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h @@ -125,7 +125,7 @@ protected slots: /// Return the attribute values wrapped in a list of viewer presentations /// \return a list of viewer presentations, which contains an attribute result and /// a shape. If the attribute do not uses the shape, it is empty - QList getCurrentSelection() const; + QList getAttributeSelection() const; protected: /// Update selection list diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index 9d80e0f79..cea370ba2 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -147,7 +147,7 @@ bool ModuleBase_WidgetShapeSelector::setObject(ObjectPtr theSelectedObject, } //******************************************************************** -QList ModuleBase_WidgetShapeSelector::getCurrentSelection() const +QList ModuleBase_WidgetShapeSelector::getAttributeSelection() const { QList aSelected; if(myFeature) { @@ -330,7 +330,7 @@ void ModuleBase_WidgetShapeSelector::activateCustom() activateSelection(true); // Restore selection in the viewer by the attribute selection list - myWorkshop->setSelected(getCurrentSelection()); + myWorkshop->setSelected(getAttributeSelection()); activateFilters(myWorkshop, true); } diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.h b/src/ModuleBase/ModuleBase_WidgetShapeSelector.h index 66d766d9f..e21d756fd 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.h @@ -139,7 +139,7 @@ Q_OBJECT /// Return the attribute values wrapped in a list of viewer presentations /// \return a list of viewer presentations, which contains an attribute result and /// a shape. If the attribute do not uses the shape, it is empty - QList getCurrentSelection() const; + QList getAttributeSelection() const; //----------- Class members ------------- protected: