File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ void QgsBrowserDockWidget::showEvent( QShowEvent * e )
309
309
mBrowserView ->header ()->setStretchLastSection ( false );
310
310
311
311
QSettings settings;
312
- QString lastPath = settings.value ( " /BrowserWidget /lastExpanded" ).toString ();
312
+ QString lastPath = settings.value ( " /" + objectName (). toLower () + " /lastExpanded" ).toString ();
313
313
314
314
// expand root favourites item
315
315
for ( int i = 0 ; i < mModel ->rowCount (); i++ )
@@ -327,7 +327,7 @@ void QgsBrowserDockWidget::showEvent( QShowEvent * e )
327
327
expandPath ( lastPath );
328
328
// save again lastExpanded because QTreeView expands items from deepest and last expanded() signal
329
329
// is called from highest item and that is stored in settings
330
- settings.setValue ( " /BrowserWidget /lastExpanded" , lastPath );
330
+ settings.setValue ( " /" + objectName (). toLower () + " /lastExpanded" , lastPath );
331
331
}
332
332
}
333
333
@@ -702,8 +702,7 @@ void QgsBrowserDockWidget::itemExpanded( const QModelIndex& index )
702
702
if ( !item )
703
703
return ;
704
704
705
- // TODO: save separately each type (FS, WMS)?
706
- settings.setValue ( " /BrowserWidget/lastExpanded" , item->path () );
705
+ settings.setValue ( " /" + objectName ().toLower () + " /lastExpanded" , item->path () );
707
706
QgsDebugMsg ( " last expanded: " + item->path () );
708
707
}
709
708
You can’t perform that action at this time.
0 commit comments