]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Bug IPAL13192, undone the modification in Application and Study that removed
authorsrn <srn@opencascade.com>
Thu, 17 Aug 2006 13:38:49 +0000 (13:38 +0000)
committersrn <srn@opencascade.com>
Thu, 17 Aug 2006 13:38:49 +0000 (13:38 +0000)
the fifth file (_fra.med) mentioned in bug 13069. The file have to be left untouched.

src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Application.h
src/SalomeApp/SalomeApp_Study.cxx

index a1f8a689f93545f2c7c7a52b60a165dd56e0dd80..2f534497cf0c05ba1d4c0298eeb3daf49caed9f4 100644 (file)
@@ -91,9 +91,7 @@ extern "C" SALOMEAPP_EXPORT SUIT_Application* createApplication()
 /*!Constructor.*/
 SalomeApp_Application::SalomeApp_Application()
 : LightApp_Application()
-{
-  _studyIDs.clear();
-}
+{}
 
 /*!Destructor.
  *\li Destroy event filter.
@@ -1105,33 +1103,3 @@ void SalomeApp_Application::updateSavePointDataObjects( SalomeApp_Study* study )
     delete it.data();
 }
 
-/*!Adds a study Id to the map of stored IDs - to be closed on the application closing*/
-void SalomeApp_Application::addStudyId(const int theId)
-{ 
-  _studyIDs[theId] = 10;
-}
-
-/*!Removes a study Id from the map of stored IDs*/
-void SalomeApp_Application::removeStudyId(const int theId)
-{
-  _studyIDs.remove(theId);
-}
-
-
-
-/*!Iterates all opened study and closes them*/
-void SalomeApp_Application::closeApplication()
-{
-  std::vector<int> ids;
-  QMap<int, int>::Iterator it;
-  for (it = _studyIDs.begin(); it != _studyIDs.end(); it++) {
-    ids.push_back(it.key());
-  }
-
-  LightApp_Application::closeApplication();
-
-  for(int i = 0,sz = ids.size(); i<sz; i++) {
-    _PTR(Study) aStudy = studyMgr()->GetStudyByID(ids[i]);
-    if (aStudy) studyMgr()->Close(aStudy);
-  }
-}
index 6106f3ee66be0e30b454dd3e89eabaeb569cfdc6..598379127686570a61d7e3c3ba8b266d6166d4c4 100644 (file)
@@ -92,10 +92,6 @@ public:
   SUIT_ViewManager*                   newViewManager(const QString&);
   void                                updateSavePointDataObjects( SalomeApp_Study* );
 
-  virtual void                        closeApplication();
-  void                                addStudyId(const int theId);
-  void                                removeStudyId(const int theId);
-
 public slots:
   virtual bool                        onOpenDoc( const QString& );
   virtual void                        onLoadDoc();
@@ -134,10 +130,6 @@ private slots:
   void                                onRegDisplay();
   void                                onOpenWith();
 
-private:
-
-  QMap<int,int> _studyIDs;
-
 };
 
 #ifdef WIN32
index 74adaf2add73014b5b77af281f17d17211d62082..6852b26db84706816c3595318eb796c39c43c738 100644 (file)
@@ -289,11 +289,6 @@ void SalomeApp_Study::closeDocument(bool permanently)
   if ( studyPtr )
   {
     if(permanently) {
-      //SRN: bug 13069: If the study is closed permanently it is closed so remove its Id from the list of
-      //IDs of studies to be closed on the application closing
-      SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>(application());
-      if(app) app->removeStudyId(studyPtr->StudyId());  
-      //SRN: End
       SalomeApp_Application::studyMgr()->Close( studyPtr );
     }
     SALOMEDSClient_Study* aStudy = 0;
@@ -393,13 +388,7 @@ bool SalomeApp_Study::openStudyData( const QString& theFileName )
 */
 void SalomeApp_Study::setStudyDS( const _PTR(Study)& s )
 {
-   
   myStudyDS = s;
-
-  if(myStudyDS) {
-   SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>(application());
-   if(app) app->addStudyId(myStudyDS->StudyId()); //Add a new study Id
-  }
 }
 
 /*!