if ( myCurrentLineEdit == myLineEdit1 ) myGroups1 = aGroups;
else if ( myCurrentLineEdit == myLineEdit2 ) myGroups2 = aGroups;
else if ( myCurrentLineEdit == myLineEdit3 ) myGroups3 = aGroups;
- myCurrentLineEdit->setText( aGroups.count() == 1 ? aGroups[0]->GetName() :
+ CORBA::String_var name = aGroups[0]->GetName();
+ myCurrentLineEdit->setText( aGroups.count() == 1 ? QString(name).trimmed() :
QObject::tr( "SMESH_OBJECTS_SELECTED" ).arg( aGroups.count() ) );
}
else {
if ( pObj && !myMeshOrPart->_is_nil() )
{
myMeshIO = anIO;
- myDlg->myMeshName->setText( pObj->GetName().c_str() );
+ std::string name = pObj->GetName();
+ myDlg->myMeshName->setText( QString( name.c_str() ).trimmed() );
newMeshEntry = anIO->getEntry();
SMESH::array_of_ElementType_var types = myMeshOrPart->GetTypes();
myDlg->setTypes( types );
}
}
-
//=================================================================================
// function : setCurrentSelection()
// purpose :
QStringList names, ids;
LightApp_Dialog::TypesList types;
selected( names, types, ids );
+ for ( int i = 0; i < names.count(); ++i )
+ names[i] = names[i].trimmed();
myDlg->selectObject( names, types, ids );
// enable/desable "new mesh" button
int aNbSel = selected.Extent();
if (aNbSel == 1) {
Handle(SALOME_InteractiveObject) anIObject = selected.First();
- theName = anIObject->getName();
+ theName = QString( anIObject->getName() ).trimmed();
} else {
theName = QObject::tr("SMESH_OBJECTS_SELECTED").arg(aNbSel);
}