Skip to content

Commit 41b5973

Browse files
author
mhugent
committedDec 12, 2009
Update composer previews if refresh button is clicked. Fix for bug #2207
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12421 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed
 

‎src/app/composer/qgscomposer.cpp

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,24 @@ void QgsComposer::on_mActionZoomOut_triggered()
433433

434434
void QgsComposer::on_mActionRefreshView_triggered()
435435
{
436-
if ( mComposition )
436+
if ( !mComposition )
437437
{
438-
mComposition->update();
438+
return;
439439
}
440+
441+
//refresh preview of all composer maps
442+
QMap<QgsComposerItem*, QWidget*>::iterator it = mItemWidgetMap.begin();
443+
for(; it != mItemWidgetMap.end(); ++it)
444+
{
445+
QgsComposerMap* map = dynamic_cast<QgsComposerMap*>(it.key());
446+
if(map && !map->isDrawing())
447+
{
448+
map->cache();
449+
map->update();
450+
}
451+
}
452+
453+
mComposition->update();
440454
}
441455

442456
void QgsComposer::on_mActionExportAsPDF_triggered()

0 commit comments

Comments
 (0)
Please sign in to comment.