From f0c46038726840debcc76d06d6ddb1eafcd7a10a Mon Sep 17 00:00:00 2001 From: srn Date: Thu, 2 Feb 2006 07:59:22 +0000 Subject: [PATCH] implemented method restoreVisualParameters --- src/Session/Session_Session_i.cxx | 16 ++++++++++++++++ src/Session/Session_Session_i.hxx | 3 +++ 2 files changed, 19 insertions(+) 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 -- 2.39.2