Skip to content
Permalink
Browse files

Disable degree / minute / second format if map units are not degrees

  • Loading branch information
mhugent committed Aug 9, 2012
1 parent d0b4fc1 commit 5821e2b481afb811cdc9560ee152ba961322347b
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/core/composer/qgscomposermap.cpp
@@ -1989,11 +1989,18 @@ void QgsComposerMap::createDefaultOverviewFrameSymbol()
void QgsComposerMap::initGridAnnotationFormatFromProject()
{
QString format = QgsProject::instance()->readEntry( "PositionPrecision", "/DegreeFormat", "D" );
if ( format == "DM" )

bool degreeUnits = true;
if ( mMapRenderer )
{
degreeUnits = ( mMapRenderer->mapUnits() == QGis::Degrees );
}

if ( format == "DM" && degreeUnits )
{
mGridAnnotationFormat = DegreeMinute;
}
else if ( format == "DMS" )
else if ( format == "DMS" && degreeUnits )
{
mGridAnnotationFormat = DegreeMinuteSecond;
}

0 comments on commit 5821e2b

Please sign in to comment.
You can’t perform that action at this time.