From: vsv Date: Thu, 24 Nov 2016 15:01:10 +0000 (+0300) Subject: Issue #1865: Create a field X-Git-Tag: V_2.6.0~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8116e4f788ec3805d83d682a96b46fbf0d697391;p=modules%2Fshaper.git Issue #1865: Create a field --- diff --git a/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp b/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp index f3eebf20f..1c6ee6d47 100644 --- a/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp +++ b/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp @@ -462,9 +462,6 @@ bool CollectionPlugin_WidgetField::restoreValueCustom() AttributeStringArrayPtr aStringsAttr = aData->stringArray(CollectionPlugin_Field::COMPONENTS_NAMES_ID()); - if (!aStringsAttr->isInitialized()) - return true; - myCompNamesList.clear(); for (int i = 0; i < aStringsAttr->size(); i++) { myCompNamesList.append(aStringsAttr->value(i).c_str()); @@ -744,7 +741,6 @@ void CollectionPlugin_WidgetField::onSelectionChanged() AttributeSelectionListPtr aSelList = myFeature->data()->selectionList(CollectionPlugin_Field::SELECTED_ID()); aSelList->clear(); - aSelList->setSelectionType(getSelectionType(myShapeTypeCombo->currentIndex())); ResultPtr aResult; GeomShapePtr aShape; @@ -862,11 +858,11 @@ void CollectionPlugin_WidgetField::onShapeTypeChanged(int theType) AttributeSelectionListPtr aSelList = myFeature->data()->selectionList(CollectionPlugin_Field::SELECTED_ID()); - if (!aSelList->isInitialized()) - return; + std::string aTypeName = getSelectionType(theType); if (aTypeName == aSelList->selectionType()) return; + aSelList->setSelectionType(aTypeName); //Clear old selection clearData();