Salome HOME
Merge branch merge_1_2_d
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_StudyAPI.cxx
index 0e5a424..42e2724 100644 (file)
@@ -89,10 +89,10 @@ SMESHGUI_StudyAPI::SMESHGUI_StudyAPI ( SALOMEDS::Study_ptr aStudy,
 
   // NRI : Temporary added
   if ( myStudy->GetProperties()->IsLocked() ) {
-    QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(),
-                           QObject::tr("WARNING"), 
-                           QObject::tr("WRN_STUDY_LOCKED"),
-                           QObject::tr("BUT_OK") );
+//    QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(),
+//                         QObject::tr("WARNING"), 
+//                         QObject::tr("WRN_STUDY_LOCKED"),
+//                         QObject::tr("BUT_OK") );
     
     return;
   }
@@ -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 );
 }