Skip to content
Permalink
Browse files

Refresh item also when it had no children (they could be added in mea…

…nwhile)
  • Loading branch information
wonder-sk committed Oct 14, 2011
1 parent f8ed801 commit 30a676678ac664163c7ac509ebbb8a5be1a24cbc
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/app/qgsbrowserdockwidget.cpp
  2. +1 −1 src/browser/qgsbrowser.cpp
@@ -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 );
}
@@ -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 );
}

0 comments on commit 30a6766

Please sign in to comment.
You can’t perform that action at this time.