Skip to content
Permalink
Browse files

[composer] Set initial background colour on map items to canvas backg…

…round color (fix #3811)
  • Loading branch information
nyalldawson committed Feb 1, 2014
1 parent dba34c3 commit a9f4596f4d7bf4ae713b8872bafac6f508644e25
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/core/composer/qgscomposermap.cpp
@@ -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

0 comments on commit a9f4596

Please sign in to comment.