Skip to content
Permalink
Browse files

Remove merge conflict

  • Loading branch information
m-kuhn authored and mhugent committed Aug 9, 2012
1 parent 7a0467d commit 677cea0bdce3a9879e3e5c2f1d5fc38811f570e1
Showing with 27 additions and 11 deletions.
  1. +25 −11 src/gui/qgsmapcanvas.cpp
  2. +2 −0 src/gui/qgsmapcanvas.h
@@ -84,17 +84,6 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
, mAntiAliasing( false )
{
setObjectName( name );

QSettings settings;
bool enableBackbuffer = settings.value( "/Map/enableBackbuffer", 1 ).toBool();
//disable the update that leads to the resize crash
if ( viewport() && !enableBackbuffer )
{
#ifndef ANDROID
viewport()->setAttribute( Qt::WA_PaintOnScreen, true );
#endif //ANDROID
}

mScene = new QGraphicsScene();
setScene( mScene );
setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
@@ -105,6 +94,7 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
mMapTool = NULL;
mLastNonZoomMapTool = NULL;

mBackbufferEnabled = true;
mDrawing = false;
mFrozen = false;
mDirty = true;
@@ -380,6 +370,30 @@ void QgsMapCanvas::refresh()
if ( mDrawing )
return;

QSettings settings;
bool enableBackbufferSetting = settings.value( "/Map/enableBackbuffer", 1 ).toBool();


//disable the update that leads to the resize crash
if ( viewport() )
{
#ifndef ANDROID
if ( enableBackbufferSetting != mBackbufferEnabled )
{
qDebug() << "Enable back buffering: " << enableBackbufferSetting;
if ( enableBackbufferSetting )
{
viewport()->setAttribute( Qt::WA_PaintOnScreen, false );
}
else
{
viewport()->setAttribute( Qt::WA_PaintOnScreen, true );
}
mBackbufferEnabled = enableBackbufferSetting;
}
#endif //ANDROID
}

mDrawing = true;

if ( mRenderFlag && !mFrozen )
@@ -432,6 +432,8 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
//! map overview widget - it's controlled by QgsMapCanvas
QgsMapOverviewCanvas* mMapOverview;

//! If backbuffering is currently enabled
bool mBackbufferEnabled;
//! Flag indicating a map refresh is in progress
bool mDrawing;

0 comments on commit 677cea0

Please sign in to comment.
You can’t perform that action at this time.