//================================================================
bool SUPERVGUI_DataModel::isModified() const
{
- SalomeApp_Study* study = getStudy();
- if(study) return study->studyDS()->IsModified();
+ //SalomeApp_Study* study = getStudy();
+ //if(study) return study->studyDS()->IsModified();
return false;
}
}
}
}
+ SUPERVGUI_Main::setModifiedFlag();
}
}
}
aSupMod->updateObjBrowser();
}
else MESSAGE("NULL Supervision module!");
-
+
+ SalomeApp_Application* app = (SalomeApp_Application*)(SUIT_Session::session()->activeApplication());
+ if(app) app->updateActions();
isIn = false;
return true;
}
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<SalomeApp_Application*>(SUIT_Session::session()->activeApplication());
+ if(app) {
+ SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>(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()
}
QDialog::accept();
}
+
void setRunTime( QDateTime theRunTime ) { myRunTime = theRunTime; }
QDateTime getRunTime() const { return myRunTime; }
+ // srn: marks an active study as being modified by the Supervisor
+ // Note: to set the modified flag the method requires that Supervision
+ // component was previously added to study.
+ static void setModifiedFlag();
+
signals:
void KillMyThread(bool theValue);
void EventToSync(); // mkr : IPAL11362