Skip to content

Commit

Permalink
Fix refreshConnections: only emit if it's a root item
Browse files Browse the repository at this point in the history
and propagate down to the tree until the root is reached.
  • Loading branch information
elpaso committed Sep 18, 2017
1 parent 420dc82 commit 704ac54
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/core/qgsdataitem.cpp
Expand Up @@ -345,8 +345,16 @@ void QgsDataItem::refresh()

void QgsDataItem::refreshConnections()
{
refresh();
emit connectionsChanged();
// Walk up until the root node is reached
if ( mParent )
{
mParent->refreshConnections();
}
else
{
refresh();
emit connectionsChanged();
}
}

void QgsDataItem::refresh( const QVector<QgsDataItem *> &children )
Expand Down

0 comments on commit 704ac54

Please sign in to comment.