]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix a bug: close() method of data model is not called
authorvsr <vsr@opencascade.com>
Wed, 16 Nov 2005 08:31:50 +0000 (08:31 +0000)
committervsr <vsr@opencascade.com>
Wed, 16 Nov 2005 08:31:50 +0000 (08:31 +0000)
src/CAM/CAM_Module.cxx

index 4e18bff8f8db442044629b7898104ee7b2b2d3b0..54a0e118a2ab53393d1c4af54c6746f56fa3b059 100755 (executable)
@@ -129,8 +129,11 @@ void CAM_Module::studyClosed( SUIT_Study* study )
   if ( !camDoc ) 
     return;
 
-  if ( camDoc->containsDataModel( dataModel() ) )
-    camDoc->removeDataModel( dataModel() );
+  CAM_DataModel* dm = dataModel();
+  if ( dm && camDoc->containsDataModel( dm ) ) {
+    dm->close();
+    camDoc->removeDataModel( dm );
+  }
 }
 
 /*!Public slot, do nothing.*/