Skip to content
Permalink
Browse files

Fix sqlite errors when trying to save an updated custom projection th…

…rough the custom projection dialog

(cherry picked from commit 759ba8d)
  • Loading branch information
nyalldawson committed Dec 16, 2019
1 parent 18986ee commit ec167e8125e6eb241a72aa590313201cadf7696e
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/app/qgscustomprojectiondialog.cpp
@@ -243,10 +243,11 @@ bool QgsCustomProjectionDialog::saveCrs( QgsCoordinateReferenceSystem parameters
{
sql = "update tbl_srs set description="
+ QgsSqliteUtils::quotedString( name )
+ ",projection_acronym=" + QgsSqliteUtils::quotedString( projectionAcronym )
+ ",ellipsoid_acronym=" + QgsSqliteUtils::quotedString( ellipsoidAcronym )
+ ",projection_acronym=" + ( !projectionAcronym.isEmpty() ? QgsSqliteUtils::quotedString( projectionAcronym ) : QStringLiteral( "''" ) )
+ ",ellipsoid_acronym=" + ( !ellipsoidAcronym.isEmpty() ? QgsSqliteUtils::quotedString( ellipsoidAcronym ) : QStringLiteral( "''" ) )
+ ",parameters=" + QgsSqliteUtils::quotedString( parameters.toProj4() )
+ ",is_geo=0" // <--shamelessly hard coded for now
+ ",wkt=" + QgsSqliteUtils::quotedString( parameters.toWkt() )
+ " where srs_id=" + QgsSqliteUtils::quotedString( id )
;
QgsDebugMsgLevel( sql, 4 );

0 comments on commit ec167e8

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