From f52e408795670b686ad6ea31c09bbf65e1c7f141 Mon Sep 17 00:00:00 2001 From: srn Date: Mon, 6 Feb 2006 13:17:45 +0000 Subject: [PATCH] added method newViewManager --- src/SalomeApp/SalomeApp_Application.cxx | 5 +++++ src/SalomeApp/SalomeApp_Application.h | 4 +++- src/SalomeApp/SalomeApp_Study.cxx | 5 +++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 5139ce4f2..e4e0d9f9d 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -836,3 +836,8 @@ void SalomeApp_Application::onDblClick( QListViewItem* it ) } } } + +SUIT_ViewManager* SalomeApp_Application::newViewManager(const QString& type) +{ + return createViewManager(type); +} diff --git a/src/SalomeApp/SalomeApp_Application.h b/src/SalomeApp/SalomeApp_Application.h index 2462e557b..45edd95d8 100644 --- a/src/SalomeApp/SalomeApp_Application.h +++ b/src/SalomeApp/SalomeApp_Application.h @@ -66,6 +66,8 @@ public: static SALOME_LifeCycleCORBA* lcc(); static QString defaultEngineIOR(); + SUIT_ViewManager* newViewManager(const QString&); + public slots: virtual bool onOpenDoc( const QString& ); virtual void onLoadDoc(); @@ -83,7 +85,7 @@ protected: virtual void createPreferences( LightApp_Preferences* ); virtual void updateDesktopTitle(); - + private slots: void onDeleteInvalidReferences(); void onDblClick( QListViewItem* ); diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 09184a76a..f143be745 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -410,7 +410,8 @@ void SalomeApp_Study::addComponent(const CAM_DataModel* dm) } // Set default engine IOR aBuilder->DefineComponentInstance(aComp, SalomeApp_Application::defaultEngineIOR().latin1()); - SalomeApp_DataModel::BuildTree( aComp, root(), this, /*skipExisitng=*/true ); + //SalomeApp_DataModel::BuildTree( aComp, root(), this, /*skipExisitng=*/true ); + SalomeApp_DataModel::synchronize( aComp, this ); } } } @@ -795,7 +796,7 @@ void SalomeApp_Study::restoreState(int savePoint) vector veiewerParams = ip.parseValue(viewerEntry,'_'); string type = veiewerParams[0]; string viewerID = veiewerParams[1]; - SUIT_ViewManager* vm = ((SalomeApp_Application*)application())->createViewManager(type.c_str()); + SUIT_ViewManager* vm = ((SalomeApp_Application*)application())->newViewManager(type.c_str()); if(!vm) continue; //Unknown viewer -- 2.39.2