From 377052b22121b693a504dc20c90942db359e5bc4 Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 10 Dec 2009 09:49:41 +0000 Subject: [PATCH] debug of loading of old studies --- src/SALOMEDS/SALOMEDS_StudyBuilder.cxx | 14 ++++++++++++-- src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx | 6 ------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder.cxx b/src/SALOMEDS/SALOMEDS_StudyBuilder.cxx index 49670e54c..890cf15e4 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder.cxx @@ -40,6 +40,8 @@ #include "SALOMEDSImpl_SComponent.hxx" #include "SALOMEDSImpl_GenericAttribute.hxx" +#include "SALOME_Notebook.hxx" + #include #include @@ -196,6 +198,7 @@ void SALOMEDS_StudyBuilder::LoadWith(const _PTR(SComponent)& theSCO, const std:: SALOMEDS_SComponent* aSCO = dynamic_cast(theSCO.get()); CORBA::Object_var obj = _orb->string_to_object(theIOR.c_str()); SALOMEDS::Driver_var aDriver = SALOMEDS::Driver::_narrow(obj); + SALOMEDS::SComponent_var aComponent = SALOMEDS::SComponent::_narrow( aSCO->GetCORBAImpl() ); if (_isLocal) { SALOMEDS::Locker lock; @@ -207,9 +210,16 @@ void SALOMEDS_StudyBuilder::LoadWith(const _PTR(SComponent)& theSCO, const std:: if(!isDone && _local_impl->IsError()) THROW_SALOME_CORBA_EXCEPTION(_local_impl->GetErrorCode().c_str(),SALOME::BAD_PARAM); } - else { - _corba_impl->LoadWith(SALOMEDS::SComponent::_narrow(aSCO->GetCORBAImpl()), aDriver); + else + { + _corba_impl->LoadWith( aComponent, aDriver); } + + SALOMEDS::Study_var aStudy = aComponent->GetStudy(); + SALOME::Notebook_var aNotebookVar = aStudy->GetNotebook(); + //SALOME_Notebook* aNotebook = dynamic_cast( aStudy->_default_POA()->reference_to_servant( aNotebookVar ) ); + //if( aNotebook ) + // aNotebook->RebuildLinks(); } void SALOMEDS_StudyBuilder::Load(const _PTR(SObject)& theSCO) diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx index 8af0a4a27..7ffd82dd7 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx @@ -204,12 +204,6 @@ void SALOMEDS_StudyBuilder_i::LoadWith(SALOMEDS::SComponent_ptr anSCO, if(!isDone && _impl->IsError()) { THROW_SALOME_CORBA_EXCEPTION(_impl->GetErrorCode().c_str(),SALOME::BAD_PARAM); } - - SALOMEDS::Study_var aStudy = anSCO->GetStudy(); - SALOME::Notebook_var aNotebookVar = aStudy->GetNotebook(); - SALOME_Notebook* aNotebook = dynamic_cast( _default_POA()->reference_to_servant( aNotebookVar ) ); - if( aNotebook ) - aNotebook->RebuildLinks(); } -- 2.39.2