From a83bc991366e4957deec730823a6d76b91e6b60d Mon Sep 17 00:00:00 2001 From: mzn Date: Mon, 23 Dec 2013 07:38:48 +0000 Subject: [PATCH] Bug #261: Problems with selection of GEOM objects in HYDRO module after opening of saved study. --- src/HYDROGUI/HYDROGUI_Module.cxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index 8297a5ec..dfcc1921 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -64,6 +64,8 @@ #include #include +#include + #include #include #include @@ -82,6 +84,9 @@ #include #include +#include + +#include #include #include @@ -206,6 +211,21 @@ bool HYDROGUI_Module::activateModule( SUIT_Study* theStudy ) } } + // Load GEOM data + SalomeApp_Study* aStudy = + dynamic_cast( getApp()->activeStudy() ); + if ( aStudy ) { + SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy->studyDS() ); + GEOM::GEOM_Gen_var aGeomEngine = GeometryGUI::GetGeomGen(); + if ( !aGeomEngine->_is_nil() && !aGeomEngine->_is_nil() ) { + SALOMEDS::StudyBuilder_var aStudyBuilder = aDSStudy->NewBuilder(); + SALOMEDS::SComponent_wrap GEOM_var = aDSStudy->FindComponent( "GEOM" ); + if( !GEOM_var->_is_nil() ) { + aStudyBuilder->LoadWith( GEOM_var, aGeomEngine ); + } + } + } + return aRes; } -- 2.39.2