]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug #: NPAL19561 Strip extra spaces from groups popup menu in VISU
authordmv <dmv@opencascade.com>
Thu, 22 May 2008 08:24:24 +0000 (08:24 +0000)
committerdmv <dmv@opencascade.com>
Thu, 22 May 2008 08:24:24 +0000 (08:24 +0000)
src/VISUGUI/VisuGUI.cxx

index cad01670b51cbcef3233b4ebc32495d3a5b3a081..43648822d640cce337bec36b547f704def259a76 100644 (file)
@@ -2850,8 +2850,12 @@ void VisuGUI::contextMenuPopup( const QString& theClient, QPopupMenu* theMenu, Q
       if ( !aSObject )
        continue;
 
-      if ( !isOBClient )
-         theTitle = QString( aSObject->GetName().c_str() );
+      if ( !isOBClient ) {
+       QString aName = QString( aSObject->GetName().c_str() );
+       while ( aName.at( aName.length() - 1 ) == ' ' ) // Remove extraspaces in Name of popup
+         aName.remove( (aName.length() - 1), 1 );
+       theTitle = aName;
+      }
 
       CORBA::Object_var aCORBAObject = VISU::ClientSObjectToObject(aSObject);
       if (CORBA::is_nil(aCORBAObject)) {