]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Persistent problem of NewGeom in the Full SALOME application
authornds <natalia.donis@opencascade.com>
Wed, 17 Dec 2014 05:53:26 +0000 (08:53 +0300)
committernds <natalia.donis@opencascade.com>
Wed, 17 Dec 2014 05:53:26 +0000 (08:53 +0300)
src/NewGeom/NewGeom_Module.cpp

index 2103ed5ef9ee872c1a1853e0a9ca64741e4b3bc0..b1a115e23a101eb39a53c97dda5b9d20bb8805d8 100644 (file)
@@ -17,6 +17,7 @@
 #include <LightApp_Application.h>
 #include <LightApp_SelectionMgr.h>
 #include <LightApp_OCCSelector.h>
+#include <LightApp_Study.h>
 #include <OCCViewer_ViewModel.h>
 
 #include <SUIT_Selector.h>
@@ -257,7 +258,13 @@ NewGeom_OCCSelector* NewGeom_Module::createSelector(SUIT_ViewManager* theMgr)
 //******************************************************
 CAM_DataModel* NewGeom_Module::createDataModel()
 {
-  return new NewGeom_DataModel(this);
+  NewGeom_DataModel* aDataModel = new NewGeom_DataModel(this);
+
+  // Calling addComponent() for persistent functionality work in the SalomeApp_Study
+  LightApp_Study* aStudy = dynamic_cast<LightApp_Study*>(application()->activeStudy() );
+  aStudy->addComponent(aDataModel);
+
+  return aDataModel;
 }
 
 //******************************************************