Salome HOME
Fixed naming in Partition and in GeomAlgoAPI_MakeShapeList.
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Group.cpp
index c5761b11e359722e64dc2757ca2ccc7528df4dc9..182a1d74c0f16da727629969d45c136c016950ef 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
 // File:        FeaturesPlugin_Group.cpp
 // Created:     08 Oct 2014
 // Author:      Sergey BELASH
@@ -20,13 +22,13 @@ FeaturesPlugin_Group::FeaturesPlugin_Group()
 
 void FeaturesPlugin_Group::initAttributes()
 {
-  //data()->addAttribute(FeaturesPlugin_Group::NAME_ID(), ModelAPI_AttributeString::type());
-  data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::type());
+  //data()->addAttribute(FeaturesPlugin_Group::NAME_ID(), ModelAPI_AttributeString::typeId());
+  data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
 }
 
 void FeaturesPlugin_Group::execute()
 {
-  if (results().empty()) { // just create result if not exists
+  if (results().empty() || firstResult()->isDisabled()) { // just create result if not exists
     ResultPtr aGroup = document()->createGroup(data());
     setResult(aGroup);
   }