Salome HOME
Merge multi-study removal branch.
[modules/yacs.git] / src / genericgui / ItemEdition.cxx
index 696bf471e4f43993596d192928ed5a7932a0bc10..7602317b17d36e97ba474a87c98a15e182e63106 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2006-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2016  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
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -115,10 +115,10 @@ ItemEditionBase::ItemEditionBase(Subject* subject)
       _category = "Component";
       _type = "Salome Component";
     }
-  else if (SubjectContainer * sub = dynamic_cast<SubjectContainer*>(_subject))
+  else if (SubjectContainerBase * sub = dynamic_cast<SubjectContainerBase*>(_subject))
     {
       _category = "Container";
-      _type = "Salome Container";
+      _type = sub->getLabelForHuman();
     }
 }
 
@@ -402,9 +402,7 @@ void ItemEdition::update(GuiEvent event, int type, Subject* son)
                                         son->getName().c_str());
           break;
         case YACS::HMI::CONTAINER:
-          item =  new EditionContainer(son,
-                                       QtGuiContext::getQtCurrent()->getStackedWidget(),
-                                       son->getName().c_str());
+          item =  new EditionContainer(son,QtGuiContext::getQtCurrent()->getStackedWidget(),son->getName().c_str());
           break;
         case YACS::HMI::COMPONENT:
           item =  new EditionComponent(son,