// second case : get empty initial view frame as new ViewFrame object
aViewFrame = myInitialViewFrame;
// mkr : PAL8237 : remove first "gag" Main from children
- aViewFrame->removeChild( aViewFrame->queryList("SUPERVGUI_Main")->first() );
+ // srn: commented as it cases on application exit "X Windows error"
+ //aViewFrame->removeChild( aViewFrame->queryList("SUPERVGUI_Main")->first() );
}
if( aViewFrame ) {
updateObjBrowser();
//QApplication::restoreOverrideCursor();
+
+ // mkr : PAL7037 => rename engine of the graph (i.e. corresponding SUPERV_Graph) -->
+ if ( obj->FindAttribute(anAttr, "AttributeIOR") ) {
+ _PTR(AttributeIOR) anIOR ( anAttr );
+ SUPERV_Graph aDataFlow = engine->getGraph(anIOR->Value().c_str());
+ if ( !SUPERV_isNull(aDataFlow) ) {
+ if ( aDataFlow->IsStreamGraph() ) {
+ SUPERV_StreamGraph aStreamDataFlow = aDataFlow->ToStreamGraph();
+ if ( !SUPERV_isNull(aStreamDataFlow) )
+ aStreamDataFlow->SetName( nm.latin1() );
+ }
+ else
+ aDataFlow->SetName( nm.latin1() );
+ }
+ }
+ // mkr : PAL7037 <--
}
}
}
// 2. get empty initial view frame as new ViewFrame object
aViewFrame = myInitialViewFrame;
// mkr : PAL8237 : remove first "gag" Main from children
- aViewFrame->removeChild( aViewFrame->queryList("SUPERVGUI_Main")->first() );
+ // srn: commented as it cases on application exit "X Windows error"
+ //aViewFrame->removeChild( aViewFrame->queryList("SUPERVGUI_Main")->first() );
}
if ( aViewFrame ) {
QMap<QString, QString> SUPERVGUI::getInterfaceNameMap() const {
return myInterfaceNameMap;
}
+
+bool SUPERVGUI::updateDataFlowSOName( SUPERV::Graph_ptr theDataflow ) {
+ if ( !SUPERV_isNull(theDataflow) ) {
+ _PTR(Study) aStudy = (( SalomeApp_Study* )study)->studyDS();
+ _PTR(SObject) aSO ( aStudy->FindObjectIOR( theDataflow->getIOR() ) );
+
+ _PTR(GenericAttribute) anAttr;
+ if ( aSO ) // i.e. if theDataflow is in study
+ if ( aSO->FindAttribute(anAttr, "AttributeName") ) {
+ _PTR(AttributeName) aName ( anAttr );
+ aName->SetValue( theDataflow->Name() );
+ updateObjBrowser();
+ return true;
+ }
+ }
+ return false;
+}