mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-15 21:21:21 +05:00
0021327: EDF 1915 SMESH: impossible to select a group to copy mesh
trim white spaces at end of object name, else the object seems not selected
This commit is contained in:
parent
39f36db219
commit
6426baa9f3
@ -487,7 +487,8 @@ void SMESHGUI_DuplicateNodesDlg::onSelectionChanged()
|
|||||||
if ( myCurrentLineEdit == myLineEdit1 ) myGroups1 = aGroups;
|
if ( myCurrentLineEdit == myLineEdit1 ) myGroups1 = aGroups;
|
||||||
else if ( myCurrentLineEdit == myLineEdit2 ) myGroups2 = aGroups;
|
else if ( myCurrentLineEdit == myLineEdit2 ) myGroups2 = aGroups;
|
||||||
else if ( myCurrentLineEdit == myLineEdit3 ) myGroups3 = 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() ) );
|
QObject::tr( "SMESH_OBJECTS_SELECTED" ).arg( aGroups.count() ) );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -468,7 +468,8 @@ void SMESHGUI_FindElemByPointOp::onSelectionDone()
|
|||||||
if ( pObj && !myMeshOrPart->_is_nil() )
|
if ( pObj && !myMeshOrPart->_is_nil() )
|
||||||
{
|
{
|
||||||
myMeshIO = anIO;
|
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();
|
newMeshEntry = anIO->getEntry();
|
||||||
SMESH::array_of_ElementType_var types = myMeshOrPart->GetTypes();
|
SMESH::array_of_ElementType_var types = myMeshOrPart->GetTypes();
|
||||||
myDlg->setTypes( types );
|
myDlg->setTypes( types );
|
||||||
|
@ -1612,7 +1612,6 @@ void SMESHGUI_GroupDlg::onSelectGeomGroup(bool on)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : setCurrentSelection()
|
// function : setCurrentSelection()
|
||||||
// purpose :
|
// purpose :
|
||||||
|
@ -294,6 +294,8 @@ void SMESHGUI_Make2DFrom3DOp::selectionDone()
|
|||||||
QStringList names, ids;
|
QStringList names, ids;
|
||||||
LightApp_Dialog::TypesList types;
|
LightApp_Dialog::TypesList types;
|
||||||
selected( names, types, ids );
|
selected( names, types, ids );
|
||||||
|
for ( int i = 0; i < names.count(); ++i )
|
||||||
|
names[i] = names[i].trimmed();
|
||||||
myDlg->selectObject( names, types, ids );
|
myDlg->selectObject( names, types, ids );
|
||||||
|
|
||||||
// enable/desable "new mesh" button
|
// enable/desable "new mesh" button
|
||||||
|
@ -252,7 +252,7 @@ namespace SMESH
|
|||||||
int aNbSel = selected.Extent();
|
int aNbSel = selected.Extent();
|
||||||
if (aNbSel == 1) {
|
if (aNbSel == 1) {
|
||||||
Handle(SALOME_InteractiveObject) anIObject = selected.First();
|
Handle(SALOME_InteractiveObject) anIObject = selected.First();
|
||||||
theName = anIObject->getName();
|
theName = QString( anIObject->getName() ).trimmed();
|
||||||
} else {
|
} else {
|
||||||
theName = QObject::tr("SMESH_OBJECTS_SELECTED").arg(aNbSel);
|
theName = QObject::tr("SMESH_OBJECTS_SELECTED").arg(aNbSel);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user