X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fbufferviewfilter.cpp;h=3e4886cd87337baacf811ac904bb0a8a160adacf;hp=a14ab031a2003af34a3027c7589d05e9eb8e80e0;hb=ac84f5fd1e6a260bf4c147f623fae22ec3220647;hpb=08792d799bcff809f96ca0c04c9f9eadd119dc31 diff --git a/src/uisupport/bufferviewfilter.cpp b/src/uisupport/bufferviewfilter.cpp index a14ab031..3e4886cd 100644 --- a/src/uisupport/bufferviewfilter.cpp +++ b/src/uisupport/bufferviewfilter.cpp @@ -148,6 +148,9 @@ bool BufferViewFilter::filterAcceptBuffer(const QModelIndex &source_bufferIndex) if(!_config) return true; + if(config()->networkId().isValid() && config()->networkId() != sourceModel()->data(source_bufferIndex, NetworkModel::NetworkIdRole).value()) + return false; + if(!(_config->allowedBufferTypes() & (BufferInfo::Type)source_bufferIndex.data(NetworkModel::BufferTypeRole).toInt())) return false; @@ -206,7 +209,7 @@ bool BufferViewFilter::bufferLessThan(const QModelIndex &source_left, const QMod if(config()) { return config()->bufferList().indexOf(leftBufferId) < config()->bufferList().indexOf(rightBufferId); } else - return leftBufferId < rightBufferId; + return bufferIdLessThan(leftBufferId, rightBufferId); } bool BufferViewFilter::networkLessThan(const QModelIndex &source_left, const QModelIndex &source_right) const {