]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
added a method removeSavePoint
authorsrn <srn@opencascade.com>
Wed, 8 Feb 2006 08:48:17 +0000 (08:48 +0000)
committersrn <srn@opencascade.com>
Wed, 8 Feb 2006 08:48:17 +0000 (08:48 +0000)
src/SalomeApp/SalomeApp_Study.cxx
src/SalomeApp/SalomeApp_Study.h

index 80b9a15c860289f4e9bf48125469ab81c1221269..f7eaf1ac9b815582a5b429426154b8f0e80ca619 100644 (file)
@@ -668,6 +668,19 @@ vector<int> 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;
index 1b520e07c61f818b904719c7f59323670d4a8d13..cdd097bf4547019fdd75ba5079f89f786bf0d84a 100644 (file)
@@ -67,6 +67,7 @@ public:
   virtual void        components( QStringList& ) const;
 
   std::vector<int>    getSavePoints();
+  void                removeSavePoint(int savePoint);
   QString             getNameOfSavePoint(int savePoint);
   void                setNameOfSavePoint(int savePoint, const QString& nameOfSavePoint);
   virtual int         storeState();