From 8116e4f788ec3805d83d682a96b46fbf0d697391 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 24 Nov 2016 18:01:10 +0300 Subject: [PATCH] Issue #1865: Create a field --- src/CollectionPlugin/CollectionPlugin_WidgetField.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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(); -- 2.39.2