Salome HOME
52566]: TC7.5.0: Empty group of Balls at Diameter Equal to filter
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_SelectionOp.cxx
index 2e4c7b9c5ecc67c0709784e8a6761ffb0afb39bb..daf2bf493ff5e4a499d2e05130a58e42b61b6543 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  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
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -43,7 +43,6 @@
 #include <SVTK_ViewModel.h>
 
 #include <SALOME_ListIO.hxx>
-#include <SALOME_ListIteratorOfListIO.hxx>
 
 // SALOME KERNEL includes 
 #include <SALOMEDS_SObject.hxx>
@@ -318,7 +317,9 @@ int SMESHGUI_SelectionOp::typeById( const QString& str, const EntityType objtype
           GEOM::GEOM_Object_var obj = GEOM::GEOM_Object::_narrow(
             dynamic_cast<SALOMEDS_SObject*>( sobj.get() )->GetObject() );
           if( !CORBA::is_nil( obj ) )
-            res = SMESHGUI_Dialog::prefix( "GEOM" ) + obj->GetType();
+            // as decoding of type id is not realized in LightApp_Dialog,
+            //make all GEOM objects have same type id
+            res = SMESHGUI_Dialog::prefix( "GEOM" );// + obj->GetType();
         }
       }
       else
@@ -426,7 +427,7 @@ void SMESHGUI_SelectionOp::selected( QStringList& names,
       {
         _PTR(SObject) obj = _study->studyDS()->FindObjectID( anIt.Value()->getEntry() );
         if( obj )
-          names.append( obj->GetName().c_str() );
+          names.append( QString( obj->GetName().c_str() ).trimmed() );
       }
     }
   }