From 1f14f78cebc0ad30596e9e6209697ac4207b72f3 Mon Sep 17 00:00:00 2001 From: stv Date: Wed, 6 Feb 2008 14:04:49 +0000 Subject: [PATCH] Bug fix for IPAL18740 --- src/LightApp/LightApp_Application.cxx | 22 ++++++++++++++++------ src/LightApp/LightApp_Application.h | 3 +++ src/Qtx/QtxMainWindow.cxx | 6 ++++-- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 6b7947f2c..1554d6c8f 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -706,12 +706,6 @@ void LightApp_Application::onNewDoc() saveDockWindowsState(); CAM_Application::onNewDoc(); - - if ( !study ) // new study will be create in THIS application - { - updateWindows(); - updateViewManagers(); - } } /*! @@ -1469,6 +1463,22 @@ void LightApp_Application::onDesktopActivated() aModule->studyActivated(); } +void LightApp_Application::studyOpened( SUIT_Study* s ) +{ + CAM_Application::studyOpened( s ); + + updateWindows(); + updateViewManagers(); +} + +void LightApp_Application::studyCreated( SUIT_Study* s ) +{ + CAM_Application::studyCreated( s ); + + updateWindows(); + updateViewManagers(); +} + /*!Gets file filter. *\retval QString "(*.bin)" */ diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index 1b9e1cf2d..6a6081060 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -236,6 +236,9 @@ protected: void loadDockWindowsState(); void saveDockWindowsState(); + virtual void studyOpened( SUIT_Study* ); + virtual void studyCreated( SUIT_Study* ); + void updatePreference( const QString&, const QString&, const QString& ); QString defaultModule() const; diff --git a/src/Qtx/QtxMainWindow.cxx b/src/Qtx/QtxMainWindow.cxx index 7ca329ac2..8e77da2e1 100644 --- a/src/Qtx/QtxMainWindow.cxx +++ b/src/Qtx/QtxMainWindow.cxx @@ -238,7 +238,7 @@ QString QtxMainWindow::storeGeometry() const else y = QString( "+%1" ).arg( frame.top() ); - QString geom = QString( "%1x%2%3%4" ).arg( frame.width() ).arg( frame.height() ).arg( x ).arg( y ); + QString geom = QString( "%1x%2%3%4" ).arg( width() ).arg( height() ).arg( x ).arg( y ); QString state; switch ( windowState() ) @@ -339,7 +339,9 @@ void QtxMainWindow::retrieveGeometry( const QString& str ) state = Qt::WindowFullScreen; } - setGeometry( rect ); + resize( rect.size() ); + move( rect.topLeft() ); + if ( state != Qt::WindowNoState ) setWindowState( state ); } -- 2.39.2