Skip to content

Commit 73231d9

Browse files
committedNov 10, 2014
use browser objectName in settings key to distinguish browser2
1 parent 1018c91 commit 73231d9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

‎src/app/qgsbrowserdockwidget.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void QgsBrowserDockWidget::showEvent( QShowEvent * e )
309309
mBrowserView->header()->setStretchLastSection( false );
310310

311311
QSettings settings;
312-
QString lastPath = settings.value( "/BrowserWidget/lastExpanded" ).toString();
312+
QString lastPath = settings.value( "/" + objectName().toLower() + "/lastExpanded" ).toString();
313313

314314
// expand root favourites item
315315
for ( int i = 0; i < mModel->rowCount(); i++ )
@@ -327,7 +327,7 @@ void QgsBrowserDockWidget::showEvent( QShowEvent * e )
327327
expandPath( lastPath );
328328
// save again lastExpanded because QTreeView expands items from deepest and last expanded() signal
329329
// is called from highest item and that is stored in settings
330-
settings.setValue( "/BrowserWidget/lastExpanded", lastPath );
330+
settings.setValue( "/" + objectName().toLower() + "/lastExpanded", lastPath );
331331
}
332332
}
333333

@@ -702,8 +702,7 @@ void QgsBrowserDockWidget::itemExpanded( const QModelIndex& index )
702702
if ( !item )
703703
return;
704704

705-
// TODO: save separately each type (FS, WMS)?
706-
settings.setValue( "/BrowserWidget/lastExpanded", item->path() );
705+
settings.setValue( "/" + objectName().toLower() + "/lastExpanded", item->path() );
707706
QgsDebugMsg( "last expanded: " + item->path() );
708707
}
709708

0 commit comments

Comments
 (0)
Please sign in to comment.