X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetSelector.cpp;h=b9fe6ef9c9db8f643c71abfe33d7cce5514e4e31;hb=397bec888031ab3d5d0578d3094e01f9a052222f;hp=9d5b50a0ad9884363fa7960114d953c8cfc85b00;hpb=22b9a67e18cbd5d8eabba1ab85f26f5bad963c30;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.cpp b/src/ModuleBase/ModuleBase_WidgetSelector.cpp index 9d5b50a0a..b9fe6ef9c 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelector.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -32,7 +33,7 @@ ModuleBase_WidgetSelector::~ModuleBase_WidgetSelector() } //******************************************************************** -void ModuleBase_WidgetSelector::getGeomSelection(const ModuleBase_ViewerPrs& thePrs, +void ModuleBase_WidgetSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr& thePrs, ObjectPtr& theObject, GeomShapePtr& theShape) { @@ -44,11 +45,9 @@ void ModuleBase_WidgetSelector::getGeomSelection(const ModuleBase_ViewerPrs& the //******************************************************************** void ModuleBase_WidgetSelector::onSelectionChanged() { - QList aSelected = getFilteredSelected(); + QList aSelected = getFilteredSelected(); bool isDone = setSelection(aSelected, true/*false*/); - - if (isDone) - updateOnSelectionChanged(isDone); + updateOnSelectionChanged(isDone); } //******************************************************************** @@ -71,9 +70,9 @@ void ModuleBase_WidgetSelector::updateOnSelectionChanged(const bool theDone) } //******************************************************************** -QList ModuleBase_WidgetSelector::getAttributeSelection() const +QList ModuleBase_WidgetSelector::getAttributeSelection() const { - return QList(); + return QList(); } //******************************************************************** @@ -142,15 +141,6 @@ bool ModuleBase_WidgetSelector::activateSelectionAndFilters(bool toActivate) return activateFilters(toActivate); } -//******************************************************************** -void ModuleBase_WidgetSelector::setObject(ObjectPtr theObject, - GeomShapePtr theShape) -{ - DataPtr aData = myFeature->data(); - ModuleBase_Tools::setObject(aData->attribute(attributeID()), theObject, theShape, - myWorkshop, myIsInValidate); -} - //******************************************************************** void ModuleBase_WidgetSelector::activateCustom() { @@ -164,7 +154,7 @@ void ModuleBase_WidgetSelector::activateCustom() } //******************************************************************** -bool ModuleBase_WidgetSelector::isValidSelectionCustom(const ModuleBase_ViewerPrs& thePrs) +bool ModuleBase_WidgetSelector::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr& thePrs) { GeomShapePtr aShape = myWorkshop->selection()->getShape(thePrs); ResultPtr aResult = myWorkshop->selection()->getResult(thePrs); @@ -180,13 +170,13 @@ bool ModuleBase_WidgetSelector::isValidSelectionCustom(const ModuleBase_ViewerPr } //******************************************************************** -bool ModuleBase_WidgetSelector::setSelectionCustom(const ModuleBase_ViewerPrs& thePrs) +bool ModuleBase_WidgetSelector::setSelectionCustom(const ModuleBase_ViewerPrsPtr& thePrs) { ObjectPtr anObject; GeomShapePtr aShape; getGeomSelection(thePrs, anObject, aShape); - setObject(anObject, aShape); + ModuleBase_Tools::setObject(attribute(), anObject, aShape, myWorkshop, myIsInValidate); return true; }