{
GEOM::ListOfGO anObjs;
ConvertListOfIOInListOfGO( aList, anObjs, theShapesOnly );
- if ( anObjs.length() == 1 )
+ if ( anObjs.length() == 1 ) {
theName = GetName( anObjs[ 0 ] );
+ }
else
theName = QString( "%1_objects" ).arg( anObjs.length() );
// function : GetName()
// purpose : Get name of object
//=======================================================================
-const char* GEOMBase::GetName( GEOM::GEOM_Object_ptr theObj )
+QString GEOMBase::GetName( GEOM::GEOM_Object_ptr theObj )
{
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
if ( aSObj && aSObj->FindAttribute( anAttr, "AttributeName") )
{
_PTR(AttributeName) aNameAttr ( anAttr );
- return aNameAttr->Value().c_str();
+ return QString( aNameAttr->Value().c_str() );
}
}
}
- return "";
+ return QString("");
}
bool GEOMBase::IsShape( GEOM::GEOM_Object_ptr theObj )
{
return !theObj->_is_nil() && theObj->IsShape();
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
static void ShowErrorMessage(const char* theErrorCode, const char* theComment = 0);
/* Gets name of object */
- static const char* GetName( GEOM::GEOM_Object_ptr );
+ static QString GetName( GEOM::GEOM_Object_ptr );
static bool IsShape( GEOM::GEOM_Object_ptr theObj );
};