Skip to content

Commit

Permalink
Update CRS cache when deleting a custom CRS
Browse files Browse the repository at this point in the history
  • Loading branch information
leyan committed Jun 15, 2013
1 parent fec833f commit 3bcf890
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/qgscustomprojectiondialog.cpp
Expand Up @@ -168,6 +168,9 @@ bool QgsCustomProjectionDialog::deleteCRS( QString id )
QgsDebugMsg( QString( "failed to remove CRS from database in custom projection dialog: %1 [%2]" ).arg( mySql ).arg( sqlite3_errmsg( myDatabase ) ) );
}
sqlite3_close( myDatabase );

QgsCRSCache::instance()->updateCRSCache( QString( "USER:%1" ).arg( id ) );

return myResult == SQLITE_OK;
}

Expand Down
5 changes: 5 additions & 0 deletions src/core/qgscrscache.cpp
Expand Up @@ -106,6 +106,11 @@ void QgsCRSCache::updateCRSCache( const QString& authid )
{
mCRS.insert( authid, s );
}
else
{
mCRS.remove( authid );
}

QgsCoordinateTransformCache::instance()->invalidateCrs( authid );
}

Expand Down

0 comments on commit 3bcf890

Please sign in to comment.