-// 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
if ( type <= AddHyp )
{
myHypCombo[ type ]->addItem( txt, QVariant( index ));
+ myHypCombo[ type ]->setMaxVisibleItems( qMax( 10, myHypCombo[ type ]->count() ) );
}
else
{
}
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();
+ }
}
}
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