From: Marcus Eggenberger Date: Sun, 17 Feb 2008 17:19:09 +0000 (+0000) Subject: This should finally *fingers crossed* fix the model inconsistency reports. Please... X-Git-Tag: 0.2.0-alpha1~56 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=f9568f94f1df63d51d7862a0d0270d0b0a93f0cc This should finally *fingers crossed* fix the model inconsistency reports. Please let me know if they still appear --- 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) {