Skip to content
Permalink
Browse files
Fix for ticket #884 (inconsistent behaviour with fullscreen mode)
git-svn-id: http://svn.osgeo.org/qgis/trunk@9145 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
gjm committed Aug 24, 2008
1 parent 0eed8db commit 8449c221673e14cc72100fc28a9f6da44ba083c5
Showing with 28 additions and 2 deletions.
  1. +23 −1 src/app/qgisapp.cpp
  2. +5 −1 src/app/qgisapp.h
@@ -433,6 +433,7 @@ QgisApp::QgisApp( QSplashScreen *splash, QWidget * parent, Qt::WFlags fl )
setAcceptDrops( true );

mFullScreenMode = false;
mPrevScreenModeMaximized = false;
show();
qApp->processEvents();
//finally show all the application settings as initialised above
@@ -3305,11 +3306,32 @@ void QgisApp::toggleFullScreen()
{
if ( true == mFullScreenMode )
{
showNormal();
if ( true == mPrevScreenModeMaximized )
{
// Change to maximized state. Just calling showMaximized() results in
// the window going to the normal state. Calling showNormal() then
// showMaxmized() is a work-around. Turn off rendering for this as it
// would otherwise cause two re-renders of the map, which can take a
// long time.
bool renderFlag = getMapCanvas()->renderFlag();
getMapCanvas()->setRenderFlag(false);
showNormal();
showMaximized();
getMapCanvas()->setRenderFlag(renderFlag);
mPrevScreenModeMaximized = false;
}
else
{
showNormal();
}
mFullScreenMode = false;
}
else
{
if ( isMaximized() )
{
mPrevScreenModeMaximized = true;
}
showFullScreen();
mFullScreenMode = true;
}
@@ -698,8 +698,12 @@ class QgisApp : public QMainWindow
// Flag to indicate if maptips are on or off
bool mMapTipsVisible;

//!flag to indicat wehter we are in fullscreen mode or not
//!flag to indicate whether we are in fullscreen mode or not
bool mFullScreenMode;

//!flag to indicate that the previous screen mode was 'maximised'
bool mPrevScreenModeMaximized;

QgsPythonDialog* mPythonConsole;
QgsPythonUtils* mPythonUtils;

0 comments on commit 8449c22

Please sign in to comment.