]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistview.cpp
Places Panel: Fix implementation issues when hiding items
[dolphin.git] / src / kitemviews / kitemlistview.cpp
index 2177c629653f17ee33f4af07568b24091341b065..a3fc2bafce69187cc1fc88dc179d46a2e7d50840 100644 (file)
@@ -1049,6 +1049,12 @@ void KItemListView::slotItemsRemoved(const KItemRangeList& itemRanges)
             }
         }
 
+        // In case if the first item of a group has been removed, the group header
+        // must be applied to the next visible item.
+        if (m_grouped && index < m_model->count()) {
+            updateGroupHeaderForWidget(m_visibleItems.value(index));
+        }
+
         if (!hasMultipleRanges) {
             // The decrease-layout-size optimization in KItemListView::slotItemsInserted()
             // assumes an updated geometry. If items are removed during an active transaction,