Skip to content

Commit

Permalink
Refresh item also when it had no children (they could be added in mea…
Browse files Browse the repository at this point in the history
…nwhile)
  • Loading branch information
wonder-sk committed Oct 14, 2011
1 parent f8ed801 commit 30a6766
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsbrowserdockwidget.cpp
Expand Up @@ -269,7 +269,7 @@ void QgsBrowserDockWidget::refreshModel( const QModelIndex& index )
for ( int i = 0 ; i < mModel->rowCount( index ); i++ )
{
QModelIndex idx = mModel->index( i, 0, index );
if ( mBrowserView->isExpanded( idx ) )
if ( mBrowserView->isExpanded( idx ) || !mModel->hasChildren( idx ) )
{
refreshModel( idx );
}
Expand Down
2 changes: 1 addition & 1 deletion src/browser/qgsbrowser.cpp
Expand Up @@ -531,7 +531,7 @@ void QgsBrowser::refresh( const QModelIndex& index )
for ( int i = 0 ; i < mModel->rowCount( index ); i++ )
{
QModelIndex idx = mModel->index( i, 0, index );
if ( treeView->isExpanded( idx ) )
if ( treeView->isExpanded( idx ) || !mModel->hasChildren( idx ) )
{
refresh( idx );
}
Expand Down

0 comments on commit 30a6766

Please sign in to comment.