Skip to content

Commit 30a6766

Browse files
committed
Refresh item also when it had no children (they could be added in meanwhile)
1 parent f8ed801 commit 30a6766

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/qgsbrowserdockwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ void QgsBrowserDockWidget::refreshModel( const QModelIndex& index )
269269
for ( int i = 0 ; i < mModel->rowCount( index ); i++ )
270270
{
271271
QModelIndex idx = mModel->index( i, 0, index );
272-
if ( mBrowserView->isExpanded( idx ) )
272+
if ( mBrowserView->isExpanded( idx ) || !mModel->hasChildren( idx ) )
273273
{
274274
refreshModel( idx );
275275
}

src/browser/qgsbrowser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ void QgsBrowser::refresh( const QModelIndex& index )
531531
for ( int i = 0 ; i < mModel->rowCount( index ); i++ )
532532
{
533533
QModelIndex idx = mModel->index( i, 0, index );
534-
if ( treeView->isExpanded( idx ) )
534+
if ( treeView->isExpanded( idx ) || !mModel->hasChildren( idx ) )
535535
{
536536
refresh( idx );
537537
}

0 commit comments

Comments
 (0)