Skip to content

Commit

Permalink
Cache is default preview mode for newly added composer map now
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11705 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Sep 24, 2009
1 parent 103d036 commit 97ced4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/qgscomposerview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )
}

QgsComposerMap* composerMap = new QgsComposerMap( composition(), mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), mRubberBandItem->rect().height() );
composerMap->setPreviewMode( QgsComposerMap::Rectangle );
addComposerMap( composerMap );
scene()->removeItem( mRubberBandItem );
delete mRubberBandItem;
Expand Down Expand Up @@ -403,6 +402,9 @@ void QgsComposerView::addComposerLabel( QgsComposerLabel* label )
void QgsComposerView::addComposerMap( QgsComposerMap* map )
{
scene()->addItem( map );
//set default preview mode to cache. Must be done here between adding composer map to scene and emiting signal
map->setPreviewMode( QgsComposerMap::Cache );
map->cache();
emit composerMapAdded( map );
scene()->clearSelection();
map->setSelected( true );
Expand Down

0 comments on commit 97ced4c

Please sign in to comment.