mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
Fix missing cache skip in proj 6 code path
This commit is contained in:
parent
cb6ef056cf
commit
46807c7eaf
@ -821,7 +821,10 @@ bool QgsCoordinateTransform::setFromCache( const QgsCoordinateReferenceSystem &s
|
|||||||
if ( sourceKey.isEmpty() || destKey.isEmpty() )
|
if ( sourceKey.isEmpty() || destKey.isEmpty() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
sCacheLock.lockForRead();
|
QgsReadWriteLocker locker( sCacheLock, QgsReadWriteLocker::Read );
|
||||||
|
if ( sDisableCache )
|
||||||
|
return false;
|
||||||
|
|
||||||
const QList< QgsCoordinateTransform > values = sTransforms.values( qMakePair( sourceKey, destKey ) );
|
const QList< QgsCoordinateTransform > values = sTransforms.values( qMakePair( sourceKey, destKey ) );
|
||||||
for ( auto valIt = values.constBegin(); valIt != values.constEnd(); ++valIt )
|
for ( auto valIt = values.constBegin(); valIt != values.constEnd(); ++valIt )
|
||||||
{
|
{
|
||||||
@ -833,7 +836,7 @@ bool QgsCoordinateTransform::setFromCache( const QgsCoordinateReferenceSystem &s
|
|||||||
bool hasContext = mHasContext;
|
bool hasContext = mHasContext;
|
||||||
#endif
|
#endif
|
||||||
*this = *valIt;
|
*this = *valIt;
|
||||||
sCacheLock.unlock();
|
locker.unlock();
|
||||||
|
|
||||||
mContext = context;
|
mContext = context;
|
||||||
#ifdef QGISDEBUG
|
#ifdef QGISDEBUG
|
||||||
@ -843,7 +846,6 @@ bool QgsCoordinateTransform::setFromCache( const QgsCoordinateReferenceSystem &s
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sCacheLock.unlock();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user