Skip to content

Commit

Permalink
[bookmark] use the same key for settings to store the last used direc…
Browse files Browse the repository at this point in the history
…tory: folloup 94f9ae2

(cherry-picked from 1cbbf59)
  • Loading branch information
slarosa committed Jul 13, 2015
1 parent b180dec commit 0919fe7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/qgsbookmarks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand Down Expand Up @@ -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() )
Expand Down Expand Up @@ -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.