SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if ( !app ) return;
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
- int studyId = GeometryGUI::ClientStudyToStudy( study->studyDS())->StudyId();
+ SALOMEDS::Study_var aStudyDS = GeometryGUI::ClientStudyToStudy( study->studyDS() );
+ int studyId = aStudyDS->StudyId();
myGeomObject = GeometryGUI::GetGeomGen()->GetObject( studyId, myEntry.c_str() );
updateName();
{
QString name = myGeomObject->GetName();
- QString studyEntry = myGeomObject->GetStudyEntry();
+ CORBA::String_var studyEntryVar = myGeomObject->GetStudyEntry();
- if( studyEntry.isEmpty() ) {
+ if( QString( studyEntryVar.in() ).isEmpty() ) {
if( name.isEmpty() )
name = "unpublished";
myColor = myUnpublishObjectColor;
//=================================================================================
void DependencyTree_Object::setColor( const QColor& theColor )
{
- QString studyEntry = myGeomObject->GetStudyEntry();
- if( studyEntry.isEmpty() )
+ CORBA::String_var studyEntryVar = myGeomObject->GetStudyEntry();
+ if( QString( studyEntryVar.in() ).isEmpty() )
myColor = myUnpublishObjectColor;
else
myColor = theColor;
void DependencyTree_Object::setUnpublishObjectColor( const QColor& theColor )
{
myUnpublishObjectColor = theColor;
- QString studyEntry = myGeomObject->GetStudyEntry();
- if( studyEntry.isEmpty() )
+ CORBA::String_var studyEntryVar = myGeomObject->GetStudyEntry();
+ if( QString( studyEntryVar.in() ).isEmpty() )
myColor = myUnpublishObjectColor;
}
{
for( myView->initSelected(); myView->moreSelected(); myView->nextSelected() )
if( DependencyTree_Object* treeObject = dynamic_cast<DependencyTree_Object*>( myView->selectedObject() ) ) {
- const char* entry;
- const char* name;
+ QString studyEntry;
+ QString name;
GEOM::GEOM_BaseObject_var anObj = GeometryGUI::GetGeomGen()->GetObject( myView->getStudyId(),
treeObject->getEntry().c_str() );
if( anObj->_is_nil() )
continue;
- QString studyEntry = anObj->GetStudyEntry();
+ CORBA::String_var studyEntryVar = anObj->GetStudyEntry();
+ studyEntry = studyEntryVar.in();
if( studyEntry.isEmpty() ) {
- entry = treeObject->getEntry().c_str();
+ studyEntry = treeObject->getEntry().c_str();
name = "TEMP_IO_UNPUBLISHED";
}
else {
- entry = studyEntry.toStdString().c_str();
name = "TEMP_IO";
}
Handle(SALOME_InteractiveObject) tmpIO =
- new SALOME_InteractiveObject( entry, "GEOM", name);
+ new SALOME_InteractiveObject( studyEntry.toStdString().c_str(),
+ "GEOM",
+ name.toStdString().c_str());
theList.append( new LightApp_DataOwner( tmpIO ) );
}
std::map< int, std::vector< std::string > >::const_iterator level;
for( level = levelObjects.begin(); level != levelObjects.end(); level++ ) {
- int step = -horDistance * ( level->second.size() - 1 ) / 2;
+ int step = -horDistance * ( int(level->second.size()) - 1 ) / 2;
for( int objIter = 0; objIter < level->second.size(); objIter++ ) {
DependencyTree_Object* anObject = myTreeMap[ level->second.at( objIter ) ];
anObject->setPos( step, verDistance * level->first );