@@ -1928,37 +1928,23 @@ void QgsComposerMap::drawOverviewMapExtent( QPainter* p )
19281928 {
19291929 return ;
19301930 }
1931- else if ( mComposition ->plotStyle () == QgsComposition::Preview )
1932- {
1933- context.setScaleFactor ( 1.0 );
1934- context.setRasterScaleFactor ( /* 96.0*/ mComposition ->printResolution () / 25.4 );
1935- }
1936- else // print
1931+ else
19371932 {
19381933 context.setScaleFactor ( 1.0 );
1939- double rasterScaleFactor = mComposition ->printResolution () / 25.4 ;
1940- context.setRasterScaleFactor ( rasterScaleFactor );
1934+ context.setRasterScaleFactor ( mComposition ->printResolution () / 25.4 );
19411935 }
19421936
19431937 QPolygonF polygon;
19441938 double x = ( intersectRect.xMinimum () - thisExtent.xMinimum () ) / thisExtent.width () * rect ().width ();
19451939 double y = ( thisExtent.yMaximum () - intersectRect.yMaximum () ) / thisExtent.height () * rect ().height ();
19461940 double width = intersectRect.width () / thisExtent.width () * rect ().width ();
19471941 double height = intersectRect.height () / thisExtent.height () * rect ().height ();
1948- polygon << QPointF ( x, y ) << QPointF ( x + width, y ) << QPointF ( x + width, y + height ) << QPointF ( x, y + height );
1942+ polygon << QPointF ( x, y ) << QPointF ( x + width, y ) << QPointF ( x + width, y + height ) << QPointF ( x, y + height ) << QPointF ( x, y ) ;
19491943
19501944 QList<QPolygonF> rings; // empty list
19511945 mOverviewFrameMapSymbol ->startRender ( context );
19521946 mOverviewFrameMapSymbol ->renderPolygon ( polygon, &rings, 0 , context );
19531947 mOverviewFrameMapSymbol ->stopRender ( context );
1954-
1955- /* p->setPen( QPen( Qt::red ) ); //todo: make appearance configurable
1956- p->setBrush( QBrush( QColor( 255, 0, 0, 100 ) ) );
1957- double x = ( intersectRect.xMinimum() - thisExtent.xMinimum() ) / thisExtent.width() * rect().width();
1958- double y = ( thisExtent.yMaximum() - intersectRect.yMaximum() ) / thisExtent.height() * rect().height();
1959- double width = intersectRect.width() / thisExtent.width() * rect().width();
1960- double height = intersectRect.height() / thisExtent.height() * rect().height();
1961- p->drawRect( QRectF( x, y, width, height ) );*/
19621948}
19631949
19641950void QgsComposerMap::createDefaultOverviewFrameSymbol ()
0 commit comments