Skip to content

Commit

Permalink
Merge pull request #661 from leyan/custom_CRS
Browse files Browse the repository at this point in the history
Update CRS cache when deleting a custom CRS
  • Loading branch information
mhugent committed Jun 15, 2013
2 parents fb15725 + 3bcf890 commit 6199c2c
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 6199c2c

Please sign in to comment.