Salome HOME
Merge remote branch 'origin/gdd/translations'
[modules/smesh.git] / src / SMESH_SWIG_WITHIHM / libSMESH_Swig.cxx
index c97dd01fd81ea7212aa43a09d6f12b3a8278f45a..68d424c9e460a74867736be52fd8d6545c0b9b32 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // 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
@@ -380,6 +380,10 @@ SMESH_Swig::Init(int theStudyID)
         aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
         aPixmap->UnRegister();
 
+        SALOMEDS::UseCaseBuilder_var useCaseBuilder = myStudy->GetUseCaseBuilder();
+        useCaseBuilder->SetRootCurrent();
+        useCaseBuilder->Append( aSComponent.in() );
+  
         myStudyBuilder->DefineComponentInstance(aSComponent,aSMESHGen);
         if (aLocked)
           myStudy->GetProperties()->SetLocked(true);