Skip to content
Permalink
Browse files

and followup 84dc1ba :(

  • Loading branch information
jef-n committed Jan 15, 2012
1 parent 84dc1ba commit 836f235e781d5caa5813fe3619d6456befade07a
Showing with 13 additions and 3 deletions.
  1. +7 −0 src/core/qgsmaprenderer.cpp
  2. +3 −0 src/core/qgsmaprenderer.h
  3. +3 −3 src/core/qgspoint.cpp
@@ -1116,11 +1116,18 @@ QgsCoordinateTransform *QgsMapRenderer::tr( QgsMapLayer *layer )
mCachedTrForLayer = layer;

connect( layer, SIGNAL( layerCrsChanged() ), this, SLOT( invalidateCachedLayerCrs() ) );
connect( layer, SIGNAL( destroyed() ), this, SLOT( cachedLayerDestroyed() ) );
}

return mCachedTr;
}

void QgsMapRenderer::cachedLayerDestroyed()
{
if ( mCachedTrForLayer == sender() )
mCachedTrForLayer = 0;
}

void QgsMapRenderer::invalidateCachedLayerCrs()
{
if ( mCachedTrForLayer )
@@ -254,6 +254,9 @@ class CORE_EXPORT QgsMapRenderer : public QObject
//! invalidate cached layer CRS
void invalidateCachedLayerCrs();

//! cached layer was destroyed
void cachedLayerDestroyed();

protected:

//! adjust extent to fit the pixmap size
@@ -129,9 +129,9 @@ QString QgsPoint::toString() const

QString QgsPoint::toString( int thePrecision ) const
{
QString rep = QString::number( m_x, 'f', thePrecision ) + QString( "," ) +
QString::number( m_y, 'f', thePrecision );
return rep;
QString x = qIsFinite( m_x ) ? QString::number( m_x, 'f', thePrecision ) : QObject::tr( "infinite" );
QString y = qIsFinite( m_y ) ? QString::number( m_y, 'f', thePrecision ) : QObject::tr( "infinite" );
return QString( "%1,%2" ).arg( x ).arg( y );
}

QString QgsPoint::toDegreesMinutesSeconds( int thePrecision ) const

0 comments on commit 836f235

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