From: mzn Date: Mon, 23 Dec 2013 07:38:48 +0000 (+0000) Subject: Bug #261: Problems with selection of GEOM objects in HYDRO module after opening of... X-Git-Tag: BR_hydro_v_0_7~82 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a83bc991366e4957deec730823a6d76b91e6b60d;p=modules%2Fhydro.git Bug #261: Problems with selection of GEOM objects in HYDRO module after opening of saved study. --- 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; }