@@ -46,7 +46,8 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int w
4646 mCrossLength( 3 ), mMapCanvas( 0 ), mDrawCanvasItems( true )
4747{
4848 mComposition = composition;
49- mOverviewFrameMapSymbol = new QgsFillSymbolV2 ();
49+ mOverviewFrameMapSymbol = 0 ;
50+ createDefaultOverviewFrameSymbol ();
5051
5152 // mId = mComposition->composerMapItems().size();
5253 int maxId = -1 ;
@@ -93,8 +94,8 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition )
9394 mTopGridAnnotationDirection( Horizontal ), mBottomGridAnnotationDirection( Horizontal ), mGridFrameStyle( NoGridFrame ), mGridFrameWidth( 2.0 ), mCrossLength( 3 ),
9495 mMapCanvas( 0 ), mDrawCanvasItems( true )
9596{
96-
97- mOverviewFrameMapSymbol = new QgsFillSymbolV2 ();
97+ mOverviewFrameMapSymbol = 0 ;
98+ createDefaultOverviewFrameSymbol ();
9899
99100 // Offset
100101 mXOffset = 0.0 ;
@@ -1959,3 +1960,14 @@ void QgsComposerMap::drawOverviewMapExtent( QPainter* p )
19591960 double height = intersectRect.height() / thisExtent.height() * rect().height();
19601961 p->drawRect( QRectF( x, y, width, height ) );*/
19611962}
1963+
1964+ void QgsComposerMap::createDefaultOverviewFrameSymbol ()
1965+ {
1966+ delete mOverviewFrameMapSymbol ;
1967+ QgsStringMap properties;
1968+ properties.insert ( " color" , " 255,0,0,125" );
1969+ properties.insert ( " style" , " solid" );
1970+ properties.insert ( " style_border" , " no" );
1971+ mOverviewFrameMapSymbol = QgsFillSymbolV2::createSimple ( properties );
1972+ mOverviewFrameMapSymbol ->setAlpha ( 0.3 );
1973+ }
0 commit comments