Salome HOME
22806: EDF SMESH: Regression: Prism_3D error
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_TranslationDlg.cxx
index 29c51666cda4ee5e42adc998654e9fcffec3ebee..ae7adcfa03066ff874cd58e8a83bf3b7491a42bb 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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
@@ -52,7 +52,6 @@
 #include <SVTK_ViewModel.h>
 #include <SVTK_ViewWindow.h>
 #include <SALOME_ListIO.hxx>
-#include <SALOME_ListIteratorOfListIO.hxx>
 
 // SALOME KERNEL includes
 #include <SALOMEDSClient.hxx>
@@ -451,7 +450,8 @@ void SMESHGUI_TranslationDlg::ConstructorsClicked (int constructorId)
   connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
   onDisplaySimulation(true);
-
+  myEditCurrentArgument->hide();
+  myEditCurrentArgument->show();
   QApplication::instance()->processEvents();
   updateGeometry();
   resize(100,100);
@@ -559,11 +559,6 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
                                                         aName.toLatin1().data());
             if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
               anEntryList.append( aSObject->GetID().c_str() );
-
-            // obj has been published in study. Its refcount has been incremented.
-            // It is safe to decrement its refcount
-            // so that it will be destroyed when the entry in study will be removed
-            mesh->UnRegister();
           }
         }
         else {
@@ -573,11 +568,6 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
                                                 LineEditNewMesh->text().toLatin1().data());
           if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) )
             anEntryList.append( aSObject->GetID().c_str() );
-        
-          // obj has been published in study. Its refcount has been incremented.
-          // It is safe to decrement its refcount
-          // so that it will be destroyed when the entry in study will be removed
-          mesh->UnRegister();
         }
         break;
       }
@@ -738,7 +728,7 @@ void SMESHGUI_TranslationDlg::SelectionIntoArgument()
 
   // get selected mesh
   SALOME_ListIO aList;
-  mySelectionMgr->selectedObjects(aList,SVTK_Viewer::Type());
+  mySelectionMgr->selectedObjects(aList);
 
   int nbSel = aList.Extent();
   if (nbSel < 1)