Skip to content
Permalink
Browse files

Don't waste time for caching the contents of composer map if the prev…

…iew mode is rectangle

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10036 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jan 28, 2009
1 parent 7abc55a commit 28bfeb573e37971e7be40513517d03db5288c20c
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/core/composer/qgscomposermap.cpp
@@ -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;
@@ -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();
}
@@ -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();
}

0 comments on commit 28bfeb5

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