Skip to content

Commit

Permalink
Don't waste time for caching the contents of composer map if the prev…
Browse files Browse the repository at this point in the history
…iew mode is rectangle

git-svn-id: http://svn.osgeo.org/qgis/trunk@10036 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jan 28, 2009
1 parent a168abc commit 66863ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/composer/qgscomposermap.cpp
Expand Up @@ -48,6 +48,7 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int w
mComposition = composition;
mMapRenderer = mComposition->mapRenderer();
mId = mCurrentComposerId++;
mPreviewMode = QgsComposerMap::Rectangle;

// Cache
mCacheUpdated = false;
Expand Down Expand Up @@ -80,6 +81,7 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition )
mComposition = composition;
mMapRenderer = mComposition->mapRenderer();
mId = mCurrentComposerId++;
mPreviewMode = QgsComposerMap::Rectangle;
setToolTip( tr( "Map %1" ).arg( mId ) );
QGraphicsRectItem::show();
}
Expand Down Expand Up @@ -370,7 +372,10 @@ void QgsComposerMap::setSceneRect( const QRectF& rectangle )
mExtent = QgsRectangle( mExtent.xMinimum(), mExtent.yMinimum(), mExtent.xMaximum(), mExtent.yMinimum() + newHeight );
mCacheUpdated = false;
emit extentChanged();
cache();
if(mPreviewMode != Rectangle)
{
cache();
}
update();
}

Expand Down

0 comments on commit 66863ff

Please sign in to comment.