1 change: 1 addition & 0 deletions src/app/legend/qgslegend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ QgsLegend::QgsLegend( QgsMapCanvas *canvas, QWidget * parent, const char *name )
, mMapCanvas( canvas )
, mMinimumIconSize( 20, 20 )
, mChanging( false )
, mUpdateDrawingOrder( false )
{
setObjectName( name );

Expand Down
5 changes: 4 additions & 1 deletion src/app/qgsprojectproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
QGis::UnitType myUnit = myRenderer->mapUnits();
setMapUnits( myUnit );

// we need to initialize it, since the on_cbxProjectionEnabled_stateChanged()
// callback triggered by setChecked() might use it.
mProjectSrsId = myRenderer->destinationCrs().srsid();

//see if the user wants on the fly projection enabled
bool myProjectionEnabled = myRenderer->hasCrsTransformEnabled();
cbxProjectionEnabled->setChecked( myProjectionEnabled );

mProjectSrsId = myRenderer->destinationCrs().srsid();
QgsDebugMsg( "Read project CRSID: " + QString::number( mProjectSrsId ) );
projectionSelector->setSelectedCrsId( mProjectSrsId );
projectionSelector->setEnabled( myProjectionEnabled );
Expand Down
18 changes: 15 additions & 3 deletions src/core/qgscoordinatereferencesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,39 @@ CUSTOM_CRS_VALIDATION QgsCoordinateReferenceSystem::mCustomSrsValidation = NULL;
//--------------------------

QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem()
: mMapUnits( QGis::UnknownUnit )
: mSrsId( 0 )
, mGeoFlag( false )
, mMapUnits( QGis::UnknownUnit )
, mSRID( 0 )
, mIsValidFlag( 0 )
, mValidationHint( "" )
, mAxisInverted( false )
{
mCRS = OSRNewSpatialReference( NULL );
}

QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( QString theDefinition )
: mMapUnits( QGis::UnknownUnit )
: mSrsId( 0 )
, mGeoFlag( false )
, mMapUnits( QGis::UnknownUnit )
, mSRID( 0 )
, mIsValidFlag( 0 )
, mValidationHint( "" )
, mAxisInverted( false )
{
mCRS = OSRNewSpatialReference( NULL );
createFromString( theDefinition );
}


QgsCoordinateReferenceSystem::QgsCoordinateReferenceSystem( const long theId, CrsType theType )
: mMapUnits( QGis::UnknownUnit )
: mSrsId( 0 )
, mGeoFlag( false )
, mMapUnits( QGis::UnknownUnit )
, mSRID( 0 )
, mIsValidFlag( 0 )
, mValidationHint( "" )
, mAxisInverted( false )
{
mCRS = OSRNewSpatialReference( NULL );
createFromId( theId, theType );
Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsmaprenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

QgsMapRenderer::QgsMapRenderer()
{
mScale = 1.0;
mScaleCalculator = new QgsScaleCalculator;
mDistArea = new QgsDistanceArea;
mCachedTrForLayer = 0;
Expand Down Expand Up @@ -163,7 +164,7 @@ void QgsMapRenderer::adjustExtentToSize()

if ( !myWidth || !myHeight )
{
mScale = 1;
mScale = 1.0;
newCoordXForm.setParameters( 0, 0, 0, 0 );
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaprenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class CORE_EXPORT QgsMapRenderer : public QObject
//! map units per pixel
double mMapUnitsPerPixel;

//! Map scale at its current zool level
//! Map scale at its current zoom level
double mScale;

//! scale calculator
Expand Down
1 change: 1 addition & 0 deletions src/core/qgsrendercontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ QgsRenderContext::QgsRenderContext()
mRenderingStopped( false ),
mScaleFactor( 1.0 ),
mRasterScaleFactor( 1.0 ),
mRendererScale( 1.0 ),
mLabelingEngine( NULL )
{

Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsscalecombobox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <QSettings>
#include <QLineEdit>

QgsScaleComboBox::QgsScaleComboBox( QWidget* parent ) : QComboBox( parent )
QgsScaleComboBox::QgsScaleComboBox( QWidget* parent ) : QComboBox( parent ), mScale( 1.0 )
{
updateScales();

Expand Down