Skip to content

Commit 3bcf890

Browse files
committed
Update CRS cache when deleting a custom CRS
1 parent fec833f commit 3bcf890

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/app/qgscustomprojectiondialog.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ bool QgsCustomProjectionDialog::deleteCRS( QString id )
168168
QgsDebugMsg( QString( "failed to remove CRS from database in custom projection dialog: %1 [%2]" ).arg( mySql ).arg( sqlite3_errmsg( myDatabase ) ) );
169169
}
170170
sqlite3_close( myDatabase );
171+
172+
QgsCRSCache::instance()->updateCRSCache( QString( "USER:%1" ).arg( id ) );
173+
171174
return myResult == SQLITE_OK;
172175
}
173176

src/core/qgscrscache.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ void QgsCRSCache::updateCRSCache( const QString& authid )
106106
{
107107
mCRS.insert( authid, s );
108108
}
109+
else
110+
{
111+
mCRS.remove( authid );
112+
}
113+
109114
QgsCoordinateTransformCache::instance()->invalidateCrs( authid );
110115
}
111116

0 commit comments

Comments
 (0)