Skip to content
Permalink
Browse files
Use QImage in QgsMapCanvasMap by default, QImage was set by default f…
…rom GUI, only if a user applied options from gui, otherwise QPixmap (8x slower) was used)
  • Loading branch information
blazek committed Nov 27, 2011
1 parent 4214507 commit 6e1d38c13969dab132f877c55c6ccbf9c7f3167b
Showing with 3 additions and 2 deletions.
  1. +1 −1 src/app/qgisapp.cpp
  2. +2 −1 src/gui/qgsmapcanvasmap.cpp
@@ -1668,7 +1668,7 @@ void QgisApp::createOverview()
QSettings mySettings;
// Anti Aliasing enabled by default as of QGIS 1.7
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing", true ).toBool() );
mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render", false ).toBool() );
mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render", true ).toBool() );

int action = mySettings.value( "/qgis/wheel_action", 0 ).toInt();
double zoomFactor = mySettings.value( "/qgis/zoom_factor", 2 ).toDouble();
@@ -26,7 +26,7 @@ QgsMapCanvasMap::QgsMapCanvasMap( QgsMapCanvas* canvas )
setZValue( -10 );
setPos( 0, 0 );
resize( QSize( 1, 1 ) );
mUseQImageToRender = false;
mUseQImageToRender = true;
}

void QgsMapCanvasMap::paint( QPainter* p, const QStyleOptionGraphicsItem*, QWidget* )
@@ -60,6 +60,7 @@ void QgsMapCanvasMap::setPanningOffset( const QPoint& point )

void QgsMapCanvasMap::render()
{
QgsDebugMsg( QString( "mUseQImageToRender = %1" ).arg( mUseQImageToRender ) );
if ( mUseQImageToRender )
{
// use temporary image for rendering

0 comments on commit 6e1d38c

Please sign in to comment.