X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUPERVGUI%2FSUPERVGUI_Main.cxx;fp=src%2FSUPERVGUI%2FSUPERVGUI_Main.cxx;h=4e4079ba9c29245c1e125bcf0d26b5bc4750192a;hb=7a8c8a266c74690ca0ecb1a593b74d3066dfb18f;hp=e9160aa1dea2daba56b67fc2eb1d6e807b045127;hpb=c7f4a494ccbe30a7966b48996cfc63bed844d446;p=modules%2Fsuperv.git diff --git a/src/SUPERVGUI/SUPERVGUI_Main.cxx b/src/SUPERVGUI/SUPERVGUI_Main.cxx index e9160aa..4e4079b 100644 --- a/src/SUPERVGUI/SUPERVGUI_Main.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Main.cxx @@ -649,6 +649,7 @@ void SUPERVGUI_Main::onPutInStudy( QString* theNodePortName ) } } } + SUPERVGUI_Main::setModifiedFlag(); } } } @@ -1270,7 +1271,9 @@ bool SUPERVGUI_Main::putDataStudy( SUPERV_Port p, const char* inout ) { aSupMod->updateObjBrowser(); } else MESSAGE("NULL Supervision module!"); - + + SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication()); + if(app) app->updateActions(); isIn = false; return true; } @@ -1492,6 +1495,32 @@ void SUPERVGUI_Main::resizeView( QResizeEvent* theEvent ) getCanvasArray()->resize( theEvent->size().width(), theEvent->size().height() ); } +/*! + Sets a modified flag in an active study + */ +void SUPERVGUI_Main::setModifiedFlag() +{ + SalomeApp_Application* app = dynamic_cast(SUIT_Session::session()->activeApplication()); + if(app) { + SalomeApp_Study* study = dynamic_cast(app->activeStudy()); + if(study) { + _PTR(Study) studyDS = study->studyDS(); + _PTR(SComponent) sco = studyDS->FindComponent(STUDY_SUPERVISION); + if(sco) { + _PTR(StudyBuilder) builder = studyDS->NewBuilder(); + _PTR(GenericAttribute) ga; + ga = builder->FindOrCreateAttribute(sco, "AttributeParameter"); + _PTR(AttributeParameter) ap(ga); + if(ap) { + ap->SetBool("SUPERVISOR_MODIFIED_FLAG",1); + app->updateActions(); + } + } + } + } +} + + /******************************* SUPERVGUI_Thread class ****************************************/ SUPERVGUI_Thread::SUPERVGUI_Thread() :QThread() @@ -1721,8 +1750,8 @@ SUPERVGUI_DSGraphParameters::~SUPERVGUI_DSGraphParameters() { Sets data function */ void SUPERVGUI_DSGraphParameters::setData() { - double aDeltaTime; - long aTimeOut; + CORBA::Double aDeltaTime; + CORBA::Long aTimeOut; SUPERV::KindOfDataStreamTrace aDataStreamTrace; // myGraph->StreamParams(aTimeOut, aDataStreamTrace, aDeltaTime); @@ -1753,3 +1782,4 @@ void SUPERVGUI_DSGraphParameters::accept() { } QDialog::accept(); } +