From 704ac5456173ef69e26794aff9b013c7f3239de8 Mon Sep 17 00:00:00 2001 From: Alessandro Pasotti Date: Mon, 18 Sep 2017 11:46:40 +0200 Subject: [PATCH] Fix refreshConnections: only emit if it's a root item and propagate down to the tree until the root is reached. --- src/core/qgsdataitem.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/core/qgsdataitem.cpp b/src/core/qgsdataitem.cpp index 8d76c083d10..12469222924 100644 --- a/src/core/qgsdataitem.cpp +++ b/src/core/qgsdataitem.cpp @@ -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 &children )