From: srn Date: Thu, 2 Feb 2006 07:59:22 +0000 (+0000) Subject: implemented method restoreVisualParameters X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f0c46038726840debcc76d06d6ddb1eafcd7a10a;p=modules%2Fgui.git implemented method restoreVisualParameters --- diff --git a/src/Session/Session_Session_i.cxx b/src/Session/Session_Session_i.cxx index 41869b4d3..6568e5479 100755 --- a/src/Session/Session_Session_i.cxx +++ b/src/Session/Session_Session_i.cxx @@ -213,3 +213,19 @@ CORBA::Long SALOME_Session_i::GetActiveStudyId() } return aStudyId; } + +bool SALOME_Session_i::restoreVisualState(CORBA::Long theSavePoint) +{ + if(SUIT_Session::session() && SUIT_Session::session()->activeApplication() ) { + SUIT_Study* study = SUIT_Session::session()->activeApplication()->activeStudy(); + if(!study) { + SUIT_Session::session()->activeApplication()->createEmptyStudy(); + study = SUIT_Session::session()->activeApplication()->activeStudy(); + } + if(!study) return false; + study->restoreState(theSavePoint); + return true; + } + + return false; +} diff --git a/src/Session/Session_Session_i.hxx b/src/Session/Session_Session_i.hxx index c9815a42d..6a7f40361 100755 --- a/src/Session/Session_Session_i.hxx +++ b/src/Session/Session_Session_i.hxx @@ -67,6 +67,9 @@ public: void ping(){}; + //! Restors a visual state of the study at theSavePoint + bool restoreVisualState(CORBA::Long theSavePoint); + protected: //! Naming service interface