Skip to content

Commit

Permalink
Use QImage in QgsMapCanvasMap by default, QImage was set by default f…
Browse files Browse the repository at this point in the history
…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 6e1d38c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 2 additions & 1 deletion src/gui/qgsmapcanvasmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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* )
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6e1d38c

Please sign in to comment.