From: nri Date: Tue, 23 Sep 2003 11:52:55 +0000 (+0000) Subject: NRI : Display Component UserName and Icon. X-Git-Tag: V1_2_2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=32975956715299318962bd208a2c1d04d25061b3;p=modules%2Fsmesh.git NRI : Display Component UserName and Icon. --- diff --git a/src/SMESHGUI/SMESHGUI_StudyAPI.cxx b/src/SMESHGUI/SMESHGUI_StudyAPI.cxx index 0e5a424fc..6c5fdc5d6 100644 --- a/src/SMESHGUI/SMESHGUI_StudyAPI.cxx +++ b/src/SMESHGUI/SMESHGUI_StudyAPI.cxx @@ -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 ); }