From: vsr Date: Fri, 1 Apr 2016 08:25:50 +0000 (+0300) Subject: 0023263: [EDF] Crash when activating YACS module from another module which does not... X-Git-Tag: V7_8_0a2~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bf230e3c7e695c54692054d556be55cb9e3ce936;p=modules%2Fgui.git 0023263: [EDF] Crash when activating YACS module from another module which does not have Object Browser - First part (second is in YACS module) --- diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index 8bf8e287f..6e7367164 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -157,6 +157,8 @@ void LightApp_Module::contextMenuPopup( const QString& client, QMenu* menu, QStr void LightApp_Module::updateObjBrowser( bool theIsUpdateDataModel, SUIT_DataObject* theDataObject ) { + if (!getApp()->objectBrowser()) + return; bool upd = getApp()->objectBrowser()->autoUpdate(); getApp()->objectBrowser()->setAutoUpdate( false ); diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index eaec2acde..dea5dccc2 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -1536,6 +1536,7 @@ void SalomeApp_Application::onDblClick( SUIT_DataObject* theObj ) if ( !aSelectedIndexes.isEmpty() ) ob->treeView()->scrollTo( aSelectedIndexes.first() ); } + emit objectDoubleClicked( theObj ); } /*! diff --git a/src/SalomeApp/SalomeApp_Application.h b/src/SalomeApp/SalomeApp_Application.h index 316a4cab3..c2b62929d 100644 --- a/src/SalomeApp/SalomeApp_Application.h +++ b/src/SalomeApp/SalomeApp_Application.h @@ -201,7 +201,7 @@ signals: const QString& theStudyName, bool theIsStudySaved ); void notebookVarUpdated( QString theVarName ); - + void objectDoubleClicked( SUIT_DataObject* ); }; #ifdef WIN32