]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
IPAL BugID9021, modified method closeDocument, added a boolean argument "permanently"
authorsrn <srn@opencascade.com>
Wed, 13 Jul 2005 04:44:38 +0000 (04:44 +0000)
committersrn <srn@opencascade.com>
Wed, 13 Jul 2005 04:44:38 +0000 (04:44 +0000)
src/CAM/CAM_Study.cxx
src/CAM/CAM_Study.h
src/SUIT/SUIT_Study.cxx
src/SUIT/SUIT_Study.h
src/SalomeApp/SalomeApp_Study.cxx
src/SalomeApp/SalomeApp_Study.h

index cdf05adc8081acd4bab7b626ac759b716dd9f5e3..95a566fbb7804c535927b00e4c365049b1305b2a 100755 (executable)
@@ -14,12 +14,12 @@ CAM_Study::~CAM_Study()
 {
 }
 
-void CAM_Study::closeDocument()
+void CAM_Study::closeDocument(bool permanently)
 {
   for ( ModelListIterator it( myDataModels ); it.current(); ++it )
     it.current()->close();
 
-  SUIT_Study::closeDocument();
+  SUIT_Study::closeDocument(permanently);
 }
 
 bool CAM_Study::appendDataModel( const CAM_DataModel* dm )
index b8c894f697e6c2698aefc8a0c7b65b43c735ca48..57e07a0319c9762c01febd066880714e1a966ef2 100755 (executable)
@@ -25,7 +25,7 @@ public:
   CAM_Study( SUIT_Application* );
   virtual ~CAM_Study();
 
-  virtual void closeDocument();
+  virtual void closeDocument(bool permanently = true);
 
   bool         appendDataModel( const CAM_DataModel* );
   virtual bool insertDataModel( const CAM_DataModel*, const int = -1 );
index 099d24393df77ebb9a28e2244efefb4176564b1c..61ca4f5f90d4426825def7260616aba04955e04a 100755 (executable)
@@ -62,7 +62,7 @@ bool SUIT_Study::isModified() const
   return myIsModified;
 }
 
-void SUIT_Study::closeDocument()
+void SUIT_Study::closeDocument(bool permanently)
 {
 }
 
index 56582caf7e9afe7811ed48a40d405ac28e0a399c..58d311eea6bdaaf57bed2d42dc5d6b7ab03a61f7 100755 (executable)
@@ -32,7 +32,7 @@ public:
   virtual bool      isSaved()  const;
   virtual bool      isModified() const;
 
-  virtual void      closeDocument();
+  virtual void      closeDocument(bool permanently = true);
   virtual void      createDocument();
   virtual bool      openDocument( const QString& );
 
index d452ebc5f09c1a428454b6a6430261f1138d0a55..8b6f9019350346dbe664bd054a0abb256f9a80a3 100644 (file)
@@ -180,7 +180,7 @@ void SalomeApp_Study::saveDocument()
 // Function : closeDocument
 // Purpose  : 
 //================================================================
-void SalomeApp_Study::closeDocument()
+void SalomeApp_Study::closeDocument(bool permanently)
 {
   // Inform everybody that this study is going to close when it's most safe to,
   // i.e. in the very beginning
@@ -190,12 +190,12 @@ void SalomeApp_Study::closeDocument()
   _PTR(Study) studyPtr = studyDS();
   if ( studyPtr )
   {
-    SalomeApp_Application::studyMgr()->Close( studyPtr );
+    if(permanently) SalomeApp_Application::studyMgr()->Close( studyPtr );
     SALOMEDSClient_Study* aStudy = 0;
     setStudyDS( _PTR(Study)(aStudy) );
   }
 
-  CAM_Study::closeDocument();
+  CAM_Study::closeDocument(permanently);
 }
 
 //================================================================
index 4e2a9b33671b4ad8a9396c57bb4c343fb3ebb7d3..0d5c3cd798b63a53fcc8f1395db22d081662b8cf 100644 (file)
@@ -28,7 +28,7 @@ public:
   virtual void        saveDocument();
   virtual bool        saveDocumentAs( const QString& );
 
-  virtual void        closeDocument();
+  virtual void        closeDocument(bool permanently = true);
 
   virtual bool        isSaved()  const;
   virtual bool        isModified() const;