From 6485f419dbba6a9f3c8c6e80225e035db4ea446e Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 26 Jan 2011 09:47:50 +0000 Subject: [PATCH] Fix observers bug: crash application (SIGSEGV) on Dump Python operation in the re-opened (non-empty) study --- src/SalomeApp/SalomeApp_Application.cxx | 4 +++- src/SalomeApp/SalomeApp_DataModel.cxx | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 1525e1b10..51f08e2fd 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -1285,9 +1285,11 @@ void SalomeApp_Application::updateObjectBrowser( const bool updateModels ) { _PTR(SComponent) aComponent ( it->Value() ); +#ifndef WITH_SALOMEDS_OBSERVER + // with GUI observers this check is not needed anymore if ( aComponent->ComponentDataType() == study->getVisualComponentName().toLatin1().constData() ) continue; // skip the magic "Interface Applicative" component - +#endif if ( !objectBrowser() ) getWindow( WT_ObjectBrowser ); const bool isAutoUpdate = objectBrowser()->autoUpdate(); diff --git a/src/SalomeApp/SalomeApp_DataModel.cxx b/src/SalomeApp/SalomeApp_DataModel.cxx index f64cf4776..0de502175 100644 --- a/src/SalomeApp/SalomeApp_DataModel.cxx +++ b/src/SalomeApp/SalomeApp_DataModel.cxx @@ -85,6 +85,10 @@ SalomeApp_DataModelSync::SalomeApp_DataModelSync( _PTR( Study ) aStudy, SUIT_Dat */ bool SalomeApp_DataModelSync::isCorrect( const kerPtr& so ) const { +#ifdef WITH_SALOMEDS_OBSERVER + // with GUI observers this function is not needed anymore + return true; +#endif kerPtr refObj; QString name = so->GetName().c_str(); _PTR( GenericAttribute ) anAttr; -- 2.39.2