From: mkr Date: Tue, 28 Feb 2006 14:45:40 +0000 (+0000) Subject: Modifications depended on changes in SALOMEDSClient package X-Git-Tag: mergeto_trunk_13Mar06~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5ef77cd548e64ea7223b775a71f8e55208c017f9;p=modules%2Fsuperv.git Modifications depended on changes in SALOMEDSClient package (see PAL11709, crash after box creation in GEOM). --- diff --git a/src/SUPERVGUI/SUPERVGUI_Main.cxx b/src/SUPERVGUI/SUPERVGUI_Main.cxx index 4aa33b0..e9160aa 100644 --- a/src/SUPERVGUI/SUPERVGUI_Main.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Main.cxx @@ -763,6 +763,7 @@ void SUPERVGUI_Main::kill() { void SUPERVGUI_Main::suspendResume() { Trace("SUPERVGUI_Main::suspendResume"); + if ((SUPERV_isNull(dataflow))) return; if (dataflow->IsEditing()) { @@ -1022,7 +1023,7 @@ _PTR(SObject) SearchOrCreateSOWithName( _PTR(Study) const theStudy, _PTR(ChildIterator) anIterator ( theStudy->NewChildIterator(theSO) ); for (; anIterator->More(); anIterator->Next()) { if (anIterator->Value()->FindAttribute(anAttr, "AttributeName")) { - aName = anAttr; + aName = _PTR(AttributeName) ( anAttr ); if (strcmp(aName->Value().c_str(), theName) == 0) { aResult = anIterator->Value(); break; @@ -1038,7 +1039,7 @@ _PTR(SObject) SearchOrCreateSOWithName( _PTR(Study) const theStudy, // add new SObject aResult = theBuilder->NewObject( theSO ); anAttr = theBuilder->FindOrCreateAttribute(aResult, "AttributeName"); - aName = anAttr; + aName = _PTR(AttributeName) ( anAttr ); aName->SetValue(theName); return aResult; } @@ -1072,7 +1073,7 @@ _PTR(SObject) createDataflowSObj( SUIT_Study* study, if ( !aComponent ) { // is supervision component not found, then create it aComponent = aBuilder->NewComponent(STUDY_SUPERVISION); anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributeName"); - aName = anAttr; + aName = _PTR(AttributeName) ( anAttr ); aName->SetValue( (( CAM_Application* )(study->application()))->moduleTitle( "SUPERV" ).latin1() ); anAttr = aBuilder->FindOrCreateAttribute(aComponent, "AttributePixMap"); @@ -1089,7 +1090,7 @@ _PTR(SObject) createDataflowSObj( SUIT_Study* study, // create dataflow SObject ("aNewDataflow_1") aSO = aBuilder->NewObject(aComponent); anAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeName"); - aName = anAttr; + aName = _PTR(AttributeName) ( anAttr ); aName->SetValue(dataflow->Name()); anAttr = aBuilder->FindOrCreateAttribute(aSO, "AttributeIOR"); _PTR(AttributeIOR) anIORAttr ( anAttr ); @@ -1618,10 +1619,10 @@ void SUPERVGUI_Thread::run() SUPERV_CNode aNode = NULL; SUPERV::GraphEvent aEvent = SUPERV::UndefinedEvent ; SUPERV::GraphState aState = SUPERV::UndefinedState ; - + // blocking function of Engine. Return from there only after anEvent happens on node aNode myMain->getDataflow()->Event(aNode, aEvent, aState); - + ProcessVoidEvent( new TMainRunEvent( this, &SUPERVGUI_Thread::main_thread_run,aNode, aEvent, aState ) ); } // end of while( myIsActive )