Skip to content

Commit 704ac54

Browse files
committed
Fix refreshConnections: only emit if it's a root item
and propagate down to the tree until the root is reached.
1 parent 420dc82 commit 704ac54

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/core/qgsdataitem.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,16 @@ void QgsDataItem::refresh()
345345

346346
void QgsDataItem::refreshConnections()
347347
{
348-
refresh();
349-
emit connectionsChanged();
348+
// Walk up until the root node is reached
349+
if ( mParent )
350+
{
351+
mParent->refreshConnections();
352+
}
353+
else
354+
{
355+
refresh();
356+
emit connectionsChanged();
357+
}
350358
}
351359

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

0 commit comments

Comments
 (0)