Skip to content
Permalink
Browse files

Diabled backbuffering choice on any other system than X11

  • Loading branch information
m-kuhn authored and mhugent committed Aug 9, 2012
1 parent 677cea0 commit 295c464f90f6b6a056181e37f19ebcc31b80820d
Showing with 10 additions and 1 deletion.
  1. +4 −0 src/app/qgsoptions.cpp
  2. +2 −0 src/core/qgsvectorlayer.cpp
  3. +4 −1 src/gui/qgsmapcanvas.cpp
@@ -230,8 +230,10 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
cmbScanZipInBrowser->setCurrentIndex( index );

// Set the enable backbuffer state
#ifdef Q_WS_X11
chkEnableBackbuffer->setChecked( settings.value( "/Map/enableBackbuffer" ).toBool() );
toggleEnableBackbuffer( chkEnableBackbuffer->checkState() );
#endif

// set the display update threshold
spinBoxUpdateThreshold->setValue( settings.value( "/Map/updateThreshold" ).toInt() );
@@ -726,6 +728,7 @@ void QgsOptions::toggleStandardDeviation( int state )
}
}

#ifdef Q_WS_X11
void QgsOptions::toggleEnableBackbuffer( int state )
{
if ( Qt::Checked == state )
@@ -739,6 +742,7 @@ void QgsOptions::toggleEnableBackbuffer( int state )
spinBoxUpdateThreshold->setEnabled( true );
}
}
#endif

QString QgsOptions::theme()
{
@@ -957,7 +957,9 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
//set update threshold before each draw to make sure the current setting is picked up
QSettings settings;
mUpdateThreshold = settings.value( "Map/updateThreshold", 0 ).toInt();
#ifdef Q_WS_X11
mEnableBackbuffer = settings.value( "/Map/enableBackbuffer", 1 ).toBool();
#endif

if ( mUsingRendererV2 )
{
@@ -371,8 +371,11 @@ void QgsMapCanvas::refresh()
return;

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

#else
bool enableBackbufferSetting = 0;
#endif

//disable the update that leads to the resize crash
if ( viewport() )

0 comments on commit 295c464

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