]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1865: Create a field
authorvsv <vitaly.smetannikov@opencascade.com>
Thu, 24 Nov 2016 15:01:10 +0000 (18:01 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Thu, 24 Nov 2016 15:01:10 +0000 (18:01 +0300)
src/CollectionPlugin/CollectionPlugin_WidgetField.cpp

index f3eebf20f171f24b1dc84459b840b6ba44e9c6ae..1c6ee6d47f0758069bbd70966643febda70e63e8 100644 (file)
@@ -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();