Skip to content

Commit

Permalink
Update composer previews if refresh button is clicked. Fix for bug #2207
Browse files Browse the repository at this point in the history


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12421 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 12, 2009
1 parent de47c00 commit 41b5973
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/app/composer/qgscomposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,24 @@ void QgsComposer::on_mActionZoomOut_triggered()

void QgsComposer::on_mActionRefreshView_triggered()
{
if ( mComposition )
if ( !mComposition )
{
mComposition->update();
return;
}

//refresh preview of all composer maps
QMap<QgsComposerItem*, QWidget*>::iterator it = mItemWidgetMap.begin();
for(; it != mItemWidgetMap.end(); ++it)
{
QgsComposerMap* map = dynamic_cast<QgsComposerMap*>(it.key());
if(map && !map->isDrawing())
{
map->cache();
map->update();
}
}

mComposition->update();
}

void QgsComposer::on_mActionExportAsPDF_triggered()
Expand Down

0 comments on commit 41b5973

Please sign in to comment.