Salome HOME
Update copyright
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshInfosDlg.cxx
index 0bc4b633afc930cd480764e3c555b85a1f43c89a..e0767710c89e203b60f6cb10ce019563716219e5 100644 (file)
@@ -1,24 +1,25 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011  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
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  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
 //
+
 // SMESH SMESHGUI : GUI for SMESH component
 // File   : SMESHGUI_MeshInfosDlg.cxx
 // Author : Nicolas BARBEROU
@@ -140,7 +141,9 @@ SMESHGUI_MeshInfosDlg::SMESHGUI_MeshInfosDlg(SMESHGUI* theModule):
 
   // buttons --> OK and Help buttons
   myOkBtn = new QPushButton(tr("SMESH_BUT_OK" ), myButtonsGroup);
-  myOkBtn->setAutoDefault(true); myOkBtn->setDefault(true);
+  myOkBtn->setAutoDefault(true);
+  myOkBtn->setDefault(true);
+  myOkBtn->setFocus();
   myHelpBtn = new QPushButton(tr("SMESH_BUT_HELP" ), myButtonsGroup);
   myHelpBtn->setAutoDefault(true);
 
@@ -198,17 +201,17 @@ void SMESHGUI_MeshInfosDlg::DumpMeshInfos()
       //CORBA::Object_var anObject = aSO->GetObject();
       CORBA::Object_var anObject = SMESH::SObjectToObject(aSO);
       if (!CORBA::is_nil(anObject)) {
-       SMESH::SMESH_IDSource_var anIDSource = SMESH::SMESH_IDSource::_narrow(anObject);
-       if (!anIDSource->_is_nil()) {
-         myWGStack->setCurrentWidget(myMeshWidget);
-         setWindowTitle(tr("SMESH_MESHINFO_TITLE") + " [" + tr("SMESH_OBJECT_MESH") + "]");
-         myMeshName->setText(aSO->GetName().c_str());
+        SMESH::SMESH_IDSource_var anIDSource = SMESH::SMESH_IDSource::_narrow(anObject);
+        if (!anIDSource->_is_nil()) {
+          myWGStack->setCurrentWidget(myMeshWidget);
+          setWindowTitle(tr("SMESH_MESHINFO_TITLE") + " [" + tr("SMESH_OBJECT_MESH") + "]");
+          myMeshName->setText(aSO->GetName().c_str());
 
-         SMESH::long_array_var aMeshInfo = anIDSource->GetMeshInfo();
-         myMeshInfoBox->SetMeshInfo( aMeshInfo );
+          SMESH::long_array_var aMeshInfo = anIDSource->GetMeshInfo();
+          myMeshInfoBox->SetMeshInfo( aMeshInfo );
 
-         return;
-       }
+          return;
+        }
       }
     }
   }
@@ -297,10 +300,10 @@ void SMESHGUI_MeshInfosDlg::onHelp()
     platform = "application";
 #endif
     SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
-                            tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                            arg(app->resourceMgr()->stringValue("ExternalBrowser", 
-                                                                platform)).
-                            arg(myHelpFileName));
+                             tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+                             arg(app->resourceMgr()->stringValue("ExternalBrowser", 
+                                                                 platform)).
+                             arg(myHelpFileName));
   }
 }