Skip to content

Commit 6e1d38c

Browse files
committedNov 27, 2011
Use QImage in QgsMapCanvasMap by default, QImage was set by default from GUI, only if a user applied options from gui, otherwise QPixmap (8x slower) was used)
1 parent 4214507 commit 6e1d38c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ void QgisApp::createOverview()
16681668
QSettings mySettings;
16691669
// Anti Aliasing enabled by default as of QGIS 1.7
16701670
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing", true ).toBool() );
1671-
mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render", false ).toBool() );
1671+
mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render", true ).toBool() );
16721672

16731673
int action = mySettings.value( "/qgis/wheel_action", 0 ).toInt();
16741674
double zoomFactor = mySettings.value( "/qgis/zoom_factor", 2 ).toDouble();

‎src/gui/qgsmapcanvasmap.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ QgsMapCanvasMap::QgsMapCanvasMap( QgsMapCanvas* canvas )
2626
setZValue( -10 );
2727
setPos( 0, 0 );
2828
resize( QSize( 1, 1 ) );
29-
mUseQImageToRender = false;
29+
mUseQImageToRender = true;
3030
}
3131

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

6161
void QgsMapCanvasMap::render()
6262
{
63+
QgsDebugMsg( QString( "mUseQImageToRender = %1" ).arg( mUseQImageToRender ) );
6364
if ( mUseQImageToRender )
6465
{
6566
// use temporary image for rendering

0 commit comments

Comments
 (0)
Please sign in to comment.