From 92f6f0630b3b5c0191d1d67a2fd2e487d5b32cc4 Mon Sep 17 00:00:00 2001 From: srn Date: Wed, 8 Feb 2006 08:48:17 +0000 Subject: [PATCH] added a method removeSavePoint --- src/SalomeApp/SalomeApp_Study.cxx | 15 ++++++++++++++- src/SalomeApp/SalomeApp_Study.h | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 80b9a15c8..f7eaf1ac9 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -668,6 +668,19 @@ vector SalomeApp_Study::getSavePoints() return v; } +//================================================================ +// Function : removeSavePoint +/*! Purpose : remove a given save point +*/ +//================================================================ +void SalomeApp_Study::removeSavePoint(int savePoint) +{ + _PTR(AttributeParameter) AP = studyDS()->GetCommonParameters("Interface Applicative", savePoint); + _PTR(SObject) so = AP->GetSObject(); + _PTR(StudyBuilder) builder = studyDS()->NewBuilder(); + builder->RemoveObjectWithChildren(so); +} + //================================================================ // Function : getNameOfSavePoint /*! Purpose : returns a name of save point @@ -823,7 +836,7 @@ void SalomeApp_Study::restoreState(int savePoint) viewWin->resize( (int)( application()->desktop()->width() * 0.6 ), (int)( application()->desktop()->height() * 0.6 ) ); viewWin->setCaption(ip.getValue(viewerEntry, j).c_str()); viewWin->setVisualParameters(ip.getValue(viewerEntry, j+1).c_str()); - + viewWin->show(); sprintf(buffer, "%s_%d", viewerID.c_str(), j); string viewEntry(buffer); if(!activeView && viewEntry == activeViewID) activeView = viewWin; diff --git a/src/SalomeApp/SalomeApp_Study.h b/src/SalomeApp/SalomeApp_Study.h index 1b520e07c..cdd097bf4 100644 --- a/src/SalomeApp/SalomeApp_Study.h +++ b/src/SalomeApp/SalomeApp_Study.h @@ -67,6 +67,7 @@ public: virtual void components( QStringList& ) const; std::vector getSavePoints(); + void removeSavePoint(int savePoint); QString getNameOfSavePoint(int savePoint); void setNameOfSavePoint(int savePoint, const QString& nameOfSavePoint); virtual int storeState(); -- 2.39.2