X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Make2DFrom3DOp.cxx;h=afc81d19acf1246e680932d387ba0022c5156fb9;hp=b11f4bdf76648c6176ee82c5da930a5f0c360f94;hb=2c607013a23bd4e7ba07e72e0c04dee2c1209cff;hpb=a619563bc793133b72374476026a2a7c8d09d1aa diff --git a/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx b/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx index b11f4bdf7..afc81d19a 100644 --- a/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx +++ b/src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx @@ -1,20 +1,20 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2011 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. +// 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. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SMESHGUI_Make2DFrom3D.cxx // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) @@ -28,12 +28,14 @@ #include "SMESH_LogicalFilter.hxx" // SALOME GUI includes +#include #include #include #include #include #include #include +#include #include #include #include @@ -337,7 +339,7 @@ bool SMESHGUI_Make2DFrom3DOp::isValid( QString& msg ) const return true; } -bool SMESHGUI_Make2DFrom3DOp::compute2DMesh() +bool SMESHGUI_Make2DFrom3DOp::compute2DMesh( QStringList& theEntryList ) { SUIT_OverrideCursor wc; @@ -373,6 +375,8 @@ bool SMESHGUI_Make2DFrom3DOp::compute2DMesh() tr("SMESH_INFORMATION"), tr("NB_ADDED").arg( nbAdded )); if ( !newMesh->_is_nil() ) { + if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( newMesh ) ) + theEntryList.append( aSObject->GetID().c_str() ); #ifdef WITHGENERICOBJ newMesh->UnRegister(); #endif @@ -403,9 +407,10 @@ bool SMESHGUI_Make2DFrom3DOp::onApply() return false; } + QStringList anEntryList; bool res = false; try { - res = compute2DMesh(); + res = compute2DMesh( anEntryList ); } catch ( const SALOME::SALOME_Exception& S_ex ) { SalomeApp_Tools::QtCatchCorbaException( S_ex ); @@ -416,6 +421,9 @@ bool SMESHGUI_Make2DFrom3DOp::onApply() if ( res ) { SMESHGUI::Modified(); update( UF_ObjBrowser | UF_Model ); + if( LightApp_Application* anApp = + dynamic_cast( SUIT_Session::session()->activeApplication() ) ) + anApp->browseObjects( anEntryList, isApplyAndClose() ); myDlg->setNewMeshName( SMESH::UniqueName( "Mesh_1" ) ); myDlg->setGroupName( SMESH::UniqueName( "Group" ) ); }