From f9568f94f1df63d51d7862a0d0270d0b0a93f0cc Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Sun, 17 Feb 2008 17:19:09 +0000 Subject: [PATCH] This should finally *fingers crossed* fix the model inconsistency reports. Please let me know if they still appear --- src/client/buffermodel.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/client/buffermodel.cpp b/src/client/buffermodel.cpp index 0b87f813..4b78ea95 100644 --- a/src/client/buffermodel.cpp +++ b/src/client/buffermodel.cpp @@ -44,11 +44,13 @@ BufferModel::~BufferModel() { bool BufferModel::filterAcceptsRow(int sourceRow, const QModelIndex &parent) const { Q_UNUSED(sourceRow); - // hide childs of buffers and everything below - if(parent.data(NetworkModel::ItemTypeRole) == NetworkModel::BufferItemType) - return false; - else + // only networks and buffers are allowed + if(!parent.isValid()) return true; + if(parent.data(NetworkModel::ItemTypeRole) == NetworkModel::NetworkItemType) + return true; + + return false; } void BufferModel::synchronizeSelectionModel(MappedSelectionModel *selectionModel) { -- 2.20.1