From: Cédric Aguerre Date: Tue, 11 Jul 2017 16:43:39 +0000 (+0200) Subject: Fix EDF #15107 - SIGSEGV because object browser is not created X-Git-Tag: V8_4_0a1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4220d474bd44af42be2671fbc6f2cd468137bcc0;p=modules%2Fmed.git Fix EDF #15107 - SIGSEGV because object browser is not created --- diff --git a/src/MEDCalc/gui/MEDModule.cxx b/src/MEDCalc/gui/MEDModule.cxx index 8a6134478..9e59a5979 100644 --- a/src/MEDCalc/gui/MEDModule.cxx +++ b/src/MEDCalc/gui/MEDModule.cxx @@ -62,6 +62,7 @@ MEDModule::MEDModule() : _datasourceController(0), _workspaceController(0), _presentationController(0), _processingController(0), _pvGuiElements(0) { + STDLOG("MEDModule::MEDModule()"); // Note also that we can't use the getApp() function here because // the initialize(...) function has not been called yet. @@ -122,9 +123,13 @@ MEDModule::init() void MEDModule::initialize( CAM_Application* app ) { + STDLOG("MEDModule::initialize()"); // call the parent implementation SalomeApp_Module::initialize( app ); + if (! getApp()->objectBrowser()) + getApp()->getWindow(SalomeApp_Application::WT_ObjectBrowser); + getApp()->objectBrowser()->setAutoOpenLevel(5); if (app && app->desktop()) { @@ -160,6 +165,7 @@ MEDModule::iconName() const void MEDModule::windows( QMap& theMap ) const { + STDLOG("MEDModule::windows()"); // want Object browser, in the left area theMap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea ); @@ -199,6 +205,7 @@ MEDModule::createPreferences() bool MEDModule::activateModule( SUIT_Study* theStudy ) { + STDLOG("MEDModule::activateModule()"); if ( CORBA::is_nil( _MED_engine ) ) return false; @@ -228,6 +235,7 @@ MEDModule::activateModule( SUIT_Study* theStudy ) bool MEDModule::deactivateModule( SUIT_Study* theStudy ) { + STDLOG("MEDModule::deactivateModule()"); _workspaceController->showDockWidgets(false); _presentationController->showDockWidgets(false); //this->unsetDockLayout();