From b205f3498a9b13f202416f60932ebc86cb5d8233 Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 19 Apr 2007 07:36:49 +0000 Subject: [PATCH] NPAL15647: EDF403: TUI: restoreVisualState is not working. --- src/SUIT/SUIT_Study.cxx | 14 ++++---------- src/SUIT/SUIT_Study.h | 1 - src/SalomeApp/SalomeApp_Study.cxx | 9 +++++++++ src/SalomeApp/SalomeApp_Study.h | 2 ++ 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/SUIT/SUIT_Study.cxx b/src/SUIT/SUIT_Study.cxx index a3baef3ce..19dabb03b 100755 --- a/src/SUIT/SUIT_Study.cxx +++ b/src/SUIT/SUIT_Study.cxx @@ -511,18 +511,12 @@ bool SUIT_Study::hasTransaction() const { return false; } - -/*! - * \brief Stores the study state -*/ -int SUIT_Study::storeState() -{ - return -1; -} /*! - * \brief Restores the study state -*/ + * \brief Restores the study state. + */ void SUIT_Study::restoreState(int savePoint) { + // Redefined in SalomeApp_Study. + // Called from SALOME_Session_i::restoreVisualState(CORBA::Long theSavePoint) } diff --git a/src/SUIT/SUIT_Study.h b/src/SUIT/SUIT_Study.h index 156c6bc74..fc6c35f0c 100755 --- a/src/SUIT/SUIT_Study.h +++ b/src/SUIT/SUIT_Study.h @@ -75,7 +75,6 @@ public: bool suspend( SUIT_Operation* ); bool resume( SUIT_Operation* ); - virtual int storeState(); virtual void restoreState(int savePoint); signals: diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 6852b26db..0ca7fa26a 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -727,6 +727,15 @@ std::string SalomeApp_Study::getVisualComponentName() return "Interface Applicative"; } +/*! + * \brief Restores the study state + */ +void SalomeApp_Study::restoreState(int savePoint) +{ + SalomeApp_VisualState((SalomeApp_Application*)application()).restoreState(savePoint); +} + + /*! Slot: called on change of a root of a data model. Redefined from CAM_Study */ diff --git a/src/SalomeApp/SalomeApp_Study.h b/src/SalomeApp/SalomeApp_Study.h index ef5c127fd..707518a37 100644 --- a/src/SalomeApp/SalomeApp_Study.h +++ b/src/SalomeApp/SalomeApp_Study.h @@ -73,6 +73,8 @@ public: void setNameOfSavePoint(int savePoint, const QString& nameOfSavePoint); virtual std::string getVisualComponentName(); + virtual void restoreState(int savePoint); + protected: virtual void saveModuleData ( QString theModuleName, QStringList theListOfFiles ); virtual void openModuleData ( QString theModuleName, QStringList& theListOfFiles ); -- 2.39.2