mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
[Bugfix]Fix Bookmarks xmax and ymin columns inversion (#5643)
(fix #16987)
This commit is contained in:
parent
793fb6114b
commit
7c08b7155b
@ -140,7 +140,7 @@ void QgsBookmarks::addClicked()
|
|||||||
|
|
||||||
QSqlQuery query( mQgisModel->database() );
|
QSqlQuery query( mQgisModel->database() );
|
||||||
query.prepare( "INSERT INTO tbl_bookmarks(bookmark_id,name,project_name,xmin,ymin,xmax,ymax,projection_srid)"
|
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( "" ) );
|
QString projStr( QLatin1String( "" ) );
|
||||||
if ( QgsProject::instance() )
|
if ( QgsProject::instance() )
|
||||||
@ -284,8 +284,8 @@ void QgsBookmarks::importFromXml()
|
|||||||
QDomElement name = bookmark.firstChildElement( QStringLiteral( "name" ) );
|
QDomElement name = bookmark.firstChildElement( QStringLiteral( "name" ) );
|
||||||
QDomElement prjname = bookmark.firstChildElement( QStringLiteral( "project" ) );
|
QDomElement prjname = bookmark.firstChildElement( QStringLiteral( "project" ) );
|
||||||
QDomElement xmin = bookmark.firstChildElement( QStringLiteral( "xmin" ) );
|
QDomElement xmin = bookmark.firstChildElement( QStringLiteral( "xmin" ) );
|
||||||
QDomElement xmax = bookmark.firstChildElement( QStringLiteral( "xmax" ) );
|
|
||||||
QDomElement ymin = bookmark.firstChildElement( QStringLiteral( "ymin" ) );
|
QDomElement ymin = bookmark.firstChildElement( QStringLiteral( "ymin" ) );
|
||||||
|
QDomElement xmax = bookmark.firstChildElement( QStringLiteral( "xmax" ) );
|
||||||
QDomElement ymax = bookmark.firstChildElement( QStringLiteral( "ymax" ) );
|
QDomElement ymax = bookmark.firstChildElement( QStringLiteral( "ymax" ) );
|
||||||
QDomElement srid = bookmark.firstChildElement( QStringLiteral( "sr_id" ) );
|
QDomElement srid = bookmark.firstChildElement( QStringLiteral( "sr_id" ) );
|
||||||
|
|
||||||
@ -674,7 +674,7 @@ void QgsMergedBookmarksTableModel::moveBookmark( QAbstractTableModel &modelFrom,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
QSqlQuery query( "INSERT INTO tbl_bookmarks(bookmark_id,name,project_name,xmin,ymin,xmax,ymax,projection_srid)"
|
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() );
|
qgisModel->database() );
|
||||||
|
|
||||||
query.bindValue( QStringLiteral( ":name" ), modelFrom.data( modelFrom.index( row, 1 ) ).toString() );
|
query.bindValue( QStringLiteral( ":name" ), modelFrom.data( modelFrom.index( row, 1 ) ).toString() );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user