Skip to content
Permalink
Browse files

[bookmark] use the same key for settings to store the last used direc…

…tory: folloup 94f9ae2

(cherry-picked from 1cbbf59)
  • Loading branch information
slarosa committed May 27, 2015
1 parent b180dec commit 0919fe7ea51f0fdd8abbba332ddb7a84f2b444e6
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/app/qgsbookmarks.cpp
@@ -267,7 +267,7 @@ void QgsBookmarks::importFromXML()
{
QSettings settings;

QString lastUsedDir = settings.value( "/Bookmark/LastUsedDirectory", QVariant() ).toString();
QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QVariant() ).toString();
QString fileName = QFileDialog::getOpenFileName( this, tr( "Import Bookmarks" ), lastUsedDir,
tr( "XML files (*.xml *XML)" ) );
if ( fileName.isEmpty() )
@@ -343,7 +343,7 @@ void QgsBookmarks::exportToXML()
{
QSettings settings;

QString lastUsedDir = settings.value( "/Bookmark/LastUsedDirectory", QVariant() ).toString();
QString lastUsedDir = settings.value( "/Windows/Bookmarks/LastUsedDirectory", QVariant() ).toString();
QString fileName = QFileDialog::getSaveFileName( this, tr( "Export bookmarks" ), lastUsedDir,
tr( "XML files( *.xml *.XML )" ) );
if ( fileName.isEmpty() )
@@ -399,5 +399,5 @@ void QgsBookmarks::exportToXML()
doc.save( out, 2 );
f.close();

settings.setValue( "/Bookmark/LastUsedDirectory", QFileInfo( fileName ).path() );
settings.setValue( "/Windows/Bookmarks/LastUsedDirectory", QFileInfo( fileName ).path() );
}

0 comments on commit 0919fe7

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