Skip to content

Commit 309b741

Browse files
author
mhugent
committed
Show a preview message if composer map preview mode is rectangle (ticket 1287)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9280 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent f035554 commit 309b741

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/core/composer/qgscomposermap.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,14 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem* i
181181

182182
double currentScaleFactorX = horizontalViewScaleFactor();
183183

184-
if ( mComposition->plotStyle() == QgsComposition::Preview && mPreviewMode != Rectangle )
184+
if ( mComposition->plotStyle() == QgsComposition::Preview && mPreviewMode == Rectangle )
185+
{
186+
QFont messageFont("", 12);
187+
painter->setFont(messageFont);
188+
painter->setPen(QColor(0, 0, 0));
189+
painter->drawText(thisPaintRect, tr("Map will be printed here"));
190+
}
191+
else if ( mComposition->plotStyle() == QgsComposition::Preview)
185192
{
186193
//draw cached pixmap. This function does not call cache() any more because
187194
//Qt 4.4.0 and 4.4.1 have problems with recursive paintings

0 commit comments

Comments
 (0)