Browser favourites restore state fix

This commit is contained in:
Radim Blazek 2015-02-19 12:50:20 +01:00
parent 09a52830cb
commit 764f9e7c0d

View File

@ -180,9 +180,13 @@ void QgsBrowserTreeView::rowsInserted( const QModelIndex & parentIndex, int star
{
QModelIndex childIndex = model()->index( i, 0, parentIndex );
QString childPath = model()->data( childIndex, QgsBrowserModel::PathRole ).toString();
QString escapedChildPath = childPath;
escapedChildPath.replace( "|", "\\|" );
if ( mExpandPaths.contains( childPath ) || mExpandPaths.indexOf( QRegExp( "^" + childPath + "/.*" ) ) != -1 )
QgsDebugMsgLevel( "childPath = " + childPath + " escapedChildPath = " + escapedChildPath, 2 );
if ( mExpandPaths.contains( childPath ) || mExpandPaths.indexOf( QRegExp( "^" + escapedChildPath + "/.*" ) ) != -1 )
{
QgsDebugMsgLevel( "-> expand", 2 );
expand( childIndex );
}
}