]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
NRI : Display Component UserName and Icon.
authornri <nri@opencascade.com>
Tue, 23 Sep 2003 11:52:55 +0000 (11:52 +0000)
committernri <nri@opencascade.com>
Tue, 23 Sep 2003 11:52:55 +0000 (11:52 +0000)
src/SMESHGUI/SMESHGUI_StudyAPI.cxx

index 0e5a424fcb1c0ba8ad998ce1c7b77fee144e14ce..6c5fdc5d673c94a37a5e7e035a205fe5a4ac5f52 100644 (file)
@@ -105,14 +105,15 @@ SMESHGUI_StudyAPI::SMESHGUI_StudyAPI ( SALOMEDS::Study_ptr aStudy,
   
   if (father->_is_nil()) {
     father = myStudyBuilder->NewComponent("MESH");
-    anAttr = myStudyBuilder->FindOrCreateAttribute(father, "AttributeName");
-    aName = SALOMEDS::AttributeName::_narrow(anAttr);
-    //NRI    aName->SetValue(QObject::tr("SMESH_MEN_COMPONENT"));
-    aName->SetValue( QAD_Application::getDesktop()->getComponentUserName( "SMESH" ) );
-    anAttr = myStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap");
-    aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
-    aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
   }
+  anAttr = myStudyBuilder->FindOrCreateAttribute(father, "AttributeName");
+  aName = SALOMEDS::AttributeName::_narrow(anAttr);
+  //NRI    aName->SetValue(QObject::tr("SMESH_MEN_COMPONENT"));
+  aName->SetValue( QAD_Application::getDesktop()->getComponentUserName( "SMESH" ) );
+  anAttr = myStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap");
+  aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
+  aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
+  
   myStudyBuilder->DefineComponentInstance(father, CompMesh );
   mySComponentMesh = SALOMEDS::SComponent::_narrow( father );
 }