mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Disable degree / minute / second format if map units are not degrees
This commit is contained in:
parent
d0b4fc17ea
commit
5821e2b481
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user