Skip to content

Commit

Permalink
[composer] Set initial background colour on map items to canvas backg…
Browse files Browse the repository at this point in the history
…round color (fix #3811)
  • Loading branch information
nyalldawson committed Feb 1, 2014
1 parent dba34c3 commit a9f4596
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/composer/qgscomposermap.cpp
Expand Up @@ -82,6 +82,12 @@ QgsComposerMap::QgsComposerMap( QgsComposition *composition, int x, int y, int w
mGridAnnotationFont.setFamily( defaultFontString );
}

//get the color for map canvas background and set map background color accordingly
int bgRedInt = QgsProject::instance()->readNumEntry( "Gui", "/CanvasColorRedPart", 255 );
int bgGreenInt = QgsProject::instance()->readNumEntry( "Gui", "/CanvasColorGreenPart", 255 );
int bgBlueInt = QgsProject::instance()->readNumEntry( "Gui", "/CanvasColorBluePart", 255 );
mBackgroundColor = QColor( bgRedInt, bgGreenInt, bgBlueInt );

connectUpdateSlot();

//calculate mExtent based on width/height ratio and map canvas extent
Expand Down

0 comments on commit a9f4596

Please sign in to comment.