]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
implemented method restoreVisualParameters
authorsrn <srn@opencascade.com>
Thu, 2 Feb 2006 07:59:22 +0000 (07:59 +0000)
committersrn <srn@opencascade.com>
Thu, 2 Feb 2006 07:59:22 +0000 (07:59 +0000)
src/Session/Session_Session_i.cxx
src/Session/Session_Session_i.hxx

index 41869b4d3a234262345768a0a0f8b56ad555010e..6568e54795c1601cf41cdf26236afca6dccbad69 100755 (executable)
@@ -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;
+}
index c9815a42d6a602fa7b01f2321ae9df9d30982f17..6a7f403615d2303602c9a2b84a1bc53d3f307fc1 100755 (executable)
@@ -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