Salome HOME
Add OVERALL_MESH_QUALITY translation for status bar.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MeshDlg.cxx
index a381acde05148beca0aabdb3259b4ac85151d585..ad2adb52012d01396aaaaee9fdae95523baef115 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  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
@@ -338,17 +338,24 @@ void SMESHGUI_MeshTab::setCurrentHyp( const int theId, const int theIndex )
   }
   else // more than one additional hyp assigned
   {
-    // move a hyp from myHypCombo[ AddHyp ] to myAddHypList
-    for ( int i = 1, nb = myHypCombo[ AddHyp ]->count(); i < nb; ++i )
+    if ( theIndex > 0 )
     {
-      int curIndex = myHypCombo[ AddHyp ]->itemData( i ).toInt();
-      if ( theIndex == curIndex )
+      // move a hyp from myHypCombo[ AddHyp ] to myAddHypList
+      for ( int i = 1, nb = myHypCombo[ AddHyp ]->count(); i < nb; ++i )
       {
-        addItem( myHypCombo[ AddHyp ]->itemText( i ), theId, theIndex );
-        myHypCombo[ AddHyp ]->removeItem( i );
-        break;
+        int curIndex = myHypCombo[ AddHyp ]->itemData( i ).toInt();
+        if ( theIndex == curIndex )
+        {
+          addItem( myHypCombo[ AddHyp ]->itemText( i ), theId, theIndex );
+          myHypCombo[ AddHyp ]->removeItem( i );
+          break;
+        }
       }
     }
+    else
+    {
+      myAddHypList->clear();
+    }
   }
 }
 
@@ -617,12 +624,32 @@ SMESHGUI_MeshDlg::SMESHGUI_MeshDlg( const bool theToCreate, const bool theIsMesh
     objectWg( Mesh, Btn )->hide();
     objectWg( Geom, Btn )->hide();
   }
+  setTitile( theToCreate, theIsMesh );
 }
 
 SMESHGUI_MeshDlg::~SMESHGUI_MeshDlg()
 {
 }
 
+//================================================================================
+/*!
+ * \brief Set dialog title
+ */
+//================================================================================
+
+void SMESHGUI_MeshDlg::setTitile( const bool theToCreate, const bool theIsMesh )
+{
+  if ( theToCreate )
+  {
+    setWindowTitle( tr( theIsMesh ? "CREATE_MESH" : "CREATE_SUBMESH" ));
+  }
+  else
+  {
+    setWindowTitle( tr( theIsMesh ? "EDIT_MESH" : "EDIT_SUBMESH") );
+  }
+  
+}
+
 //================================================================================
 /*!
  * \brief Gets tab with given id