Showing with 18 additions and 1 deletion.
  1. +18 −1 src/app/qgsprojectproperties.cpp
19 changes: 18 additions & 1 deletion src/app/qgsprojectproperties.cpp
Original file line number Diff line number Diff line change
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