Skip to content
Permalink
Browse files

fix issue7441 by automatically setting the projection elipsoid to fit

the selected CRS
  • Loading branch information
vmora committed Jul 15, 2013
1 parent 45d9db7 commit be7a026190838ae39ae22e3eda1161070e604df9
Showing with 18 additions and 1 deletion.
  1. +18 −1 src/app/qgsprojectproperties.cpp
@@ -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 )
@@ -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 );
}
}
}

0 comments on commit be7a026

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