From: asv Date: Mon, 27 Jun 2005 12:48:17 +0000 (+0000) Subject: Fix for bug with updateObjBrowser() X-Git-Tag: T3_0_0_a4~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bce1a59f1c16f8cfe9d076a0df5b4fef43f5ce34;p=modules%2Fgui.git Fix for bug with updateObjBrowser() --- 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();