X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FCollectionPlugin%2FCollectionPlugin_WidgetField.cpp;h=a2e291ed8a8f5d39e4a8386895e893fd5ffb3dc0;hb=0a332f5f970393cdf4d83f92aafd629dbe20b607;hp=e7e400d37c13971ad91b57aa62f35f78fc2ea9d5;hpb=7074394f8f08413d885f63be01df6bd5007b868c;p=modules%2Fshaper.git diff --git a/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp b/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp index e7e400d37..a2e291ed8 100644 --- a/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp +++ b/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "CollectionPlugin_WidgetField.h" @@ -499,7 +498,6 @@ bool CollectionPlugin_WidgetField::storeValueCustom() } } } - updateObject(myFeature); return true; } @@ -968,7 +966,7 @@ void CollectionPlugin_WidgetField::onTableEdited(int theRow, int theCol) //********************************************************************************** void CollectionPlugin_WidgetField::onShapeTypeChanged(int theType) { - activateSelectionAndFilters(theType == 5? false:true); + updateSelectionModesAndFilters(theType == 5? false:true); AttributeSelectionListPtr aSelList = myFeature->data()->selectionList(CollectionPlugin_Field::SELECTED_ID()); @@ -977,12 +975,16 @@ void CollectionPlugin_WidgetField::onShapeTypeChanged(int theType) if (aTypeName == aSelList->selectionType()) return; aSelList->setSelectionType(aTypeName); + // Updated event has to be sent here in case if type of shapes + // was changed from Part to any other in order to updater Apply button status + myFeature->data()->sendAttributeUpdated(aSelList.get()); //Clear old selection clearData(); aSelList->clear(); AttributeTablesPtr aTablesAttr = myFeature->data()->tables(CollectionPlugin_Field::VALUES_ID()); aTablesAttr->setSize(1, myNbComponentsSpn->value(), myDataTblList.size()); + updateObject(myFeature); emit valuesChanged(); }