From: dmv Date: Thu, 22 May 2008 08:54:11 +0000 (+0000) Subject: Bug #: NPAL19561 Strip extra spaces from groups popup menu in SMESH X-Git-Tag: V4_1_3rc1~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef54a05a857bebb64fb5cf62f28c00a67a977271;p=modules%2Fsmesh.git Bug #: NPAL19561 Strip extra spaces from groups popup menu in SMESH --- diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 73d08b61f..61c953327 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -3180,8 +3180,12 @@ void SMESHGUI::contextMenuPopup( const QString& client, QPopupMenu* menu, QStrin SalomeApp_Study* appStudy = dynamic_cast( application()->activeStudy() ); _PTR(Study) study = appStudy->studyDS(); _PTR(SObject) obj = study->FindObjectID( io->getEntry() ); - if ( obj ) - title = QString( obj->GetName().c_str() ); + if ( obj ) { + QString aName = QString( obj->GetName().c_str() ); + while ( aName.at( aName.length() - 1 ) == ' ' ) // Remove extraspaces in Name of Popup + aName.remove( (aName.length() - 1), 1 ); + title = aName; + } } }