Fix refreshConnections: only emit if it's a root item

and propagate down to the tree until the root is reached.
This commit is contained in:
Alessandro Pasotti 2017-09-18 11:46:40 +02:00
parent 420dc829f0
commit 704ac54561

View File

@ -345,8 +345,16 @@ void QgsDataItem::refresh()
void QgsDataItem::refreshConnections() void QgsDataItem::refreshConnections()
{ {
refresh(); // Walk up until the root node is reached
emit connectionsChanged(); if ( mParent )
{
mParent->refreshConnections();
}
else
{
refresh();
emit connectionsChanged();
}
} }
void QgsDataItem::refresh( const QVector<QgsDataItem *> &children ) void QgsDataItem::refresh( const QVector<QgsDataItem *> &children )