-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
{
QListWidgetItem* item = myShapesList->item(i);
QString entry = item->data( Qt::UserRole ).toString();
- Handle(SALOME_InteractiveObject) io =
- new SALOME_InteractiveObject( entry.toStdString().c_str(), "GEOM" );
- GEOM::GEOM_Object_var go = GEOMBase::ConvertIOinGEOMObject( io );
+ GEOM::GEOM_Object_var go = SMESH::EntryToInterface<GEOM::GEOM_Object>( entry );
if ( !go->_is_nil() )
goList[ nbShapes++ ] = go;
}