From bce1a59f1c16f8cfe9d076a0df5b4fef43f5ce34 Mon Sep 17 00:00:00 2001 From: asv Date: Mon, 27 Jun 2005 12:48:17 +0000 Subject: [PATCH] Fix for bug with updateObjBrowser() --- src/CAM/CAM_Application.cxx | 15 +++++++++++++++ src/CAM/CAM_Application.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/CAM/CAM_Application.cxx b/src/CAM/CAM_Application.cxx index f8ca14f3b..d13c53ef5 100755 --- a/src/CAM/CAM_Application.cxx +++ b/src/CAM/CAM_Application.cxx @@ -396,3 +396,18 @@ void CAM_Application::contextMenuPopup( const QString& type, QPopupMenu* thePopu if ( activeModule() ) activeModule()->contextMenuPopup( type, thePopup, title ); } + +void CAM_Application::createEmptyStudy() +{ + SUIT_Study* study = activeStudy(); + + STD_Application::createEmptyStudy(); + + SUIT_Study* newStudy = activeStudy(); + if ( study != newStudy ) + { + CAM_Study* camStudy = dynamic_cast( newStudy ); + for ( ModuleListIterator it( myModules ); it.current(); ++it ) + camStudy->insertDataModel( it.current()->dataModel() ); + } +} diff --git a/src/CAM/CAM_Application.h b/src/CAM/CAM_Application.h index d9eaff9a7..0ec5fd187 100755 --- a/src/CAM/CAM_Application.h +++ b/src/CAM/CAM_Application.h @@ -46,6 +46,8 @@ public: QString moduleName( const QString& ) const; QString moduleTitle( const QString& ) const; + virtual void createEmptyStudy(); + protected: virtual SUIT_Study* createNewStudy(); virtual void updateCommandsStatus(); -- 2.39.2