Skip to content

Commit

Permalink
fix issue7441 by automatically setting the projection elipsoid to fit
Browse files Browse the repository at this point in the history
the selected CRS
  • Loading branch information
vmora committed Jul 15, 2013
1 parent 45d9db7 commit be7a026
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/app/qgsprojectproperties.cpp
Expand Up @@ -834,8 +834,11 @@ void QgsProjectProperties::on_cbxProjectionEnabled_toggled( bool onFlyEnabled )
btnGrpMapUnits->setTitle( unitsOnFlyState.arg( tr( "ON" ) ) );
}

setMapUnitsToCurrentProjection();

// Enable/Disable selector and update tool-tip
updateEllipsoidUI( mEllipsoidIndex );
updateEllipsoidUI( mEllipsoidIndex ); // maybe already done by setMapUnitsToCurrentProjection

}

void QgsProjectProperties::cbxWFSPubliedStateChanged( int aIdx )
Expand Down Expand Up @@ -906,6 +909,20 @@ void QgsProjectProperties::setMapUnitsToCurrentProjection()
radMeters->setChecked( units == QGis::Meters );
radFeet->setChecked( units == QGis::Feet );
radDegrees->setChecked( units == QGis::Degrees );

// attempt to reset the projection ellipsoid according to the srs
{
int myIndex = 0;
for ( int i = 0; i < mEllipsoidList.length(); i++ )
{
if ( mEllipsoidList[ i ].description == srs.description() )
{
myIndex = i;
break;
}
}
if ( myIndex ) updateEllipsoidUI( myIndex );
}
}
}

Expand Down

0 comments on commit be7a026

Please sign in to comment.