Navigation Menu

Skip to content

Commit

Permalink
[Bugfix]Fix Bookmarks xmax and ymin columns inversion (#5643)
Browse files Browse the repository at this point in the history
(fix #16987)
  • Loading branch information
DelazJ authored and nirvn committed Nov 16, 2017
1 parent 793fb61 commit 7c08b71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/qgsbookmarks.cpp
Expand Up @@ -140,7 +140,7 @@ void QgsBookmarks::addClicked()

QSqlQuery query( mQgisModel->database() );
query.prepare( "INSERT INTO tbl_bookmarks(bookmark_id,name,project_name,xmin,ymin,xmax,ymax,projection_srid)"
" VALUES (NULL,:name,:project_name,:xmin,:xmax,:ymin,:ymax,:projection_srid)" );
" VALUES (NULL,:name,:project_name,:xmin,:ymin,:xmax,:ymax,:projection_srid)" );

QString projStr( QLatin1String( "" ) );
if ( QgsProject::instance() )
Expand Down Expand Up @@ -284,8 +284,8 @@ void QgsBookmarks::importFromXml()
QDomElement name = bookmark.firstChildElement( QStringLiteral( "name" ) );
QDomElement prjname = bookmark.firstChildElement( QStringLiteral( "project" ) );
QDomElement xmin = bookmark.firstChildElement( QStringLiteral( "xmin" ) );
QDomElement xmax = bookmark.firstChildElement( QStringLiteral( "xmax" ) );
QDomElement ymin = bookmark.firstChildElement( QStringLiteral( "ymin" ) );
QDomElement xmax = bookmark.firstChildElement( QStringLiteral( "xmax" ) );
QDomElement ymax = bookmark.firstChildElement( QStringLiteral( "ymax" ) );
QDomElement srid = bookmark.firstChildElement( QStringLiteral( "sr_id" ) );

Expand Down Expand Up @@ -674,7 +674,7 @@ void QgsMergedBookmarksTableModel::moveBookmark( QAbstractTableModel &modelFrom,
else
{
QSqlQuery query( "INSERT INTO tbl_bookmarks(bookmark_id,name,project_name,xmin,ymin,xmax,ymax,projection_srid)"
" VALUES (NULL,:name,:project_name,:xmin,:xmax,:ymin,:ymax,:projection_srid)",
" VALUES (NULL,:name,:project_name,:xmin,:ymin,:xmax,:ymax,:projection_srid)",
qgisModel->database() );

query.bindValue( QStringLiteral( ":name" ), modelFrom.data( modelFrom.index( row, 1 ) ).toString() );
Expand Down

0 comments on commit 7c08b71

Please sign in to comment.