X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fnetworkmodelactionprovider.cpp;h=6061e38261c23406a92c4c82f587de05e3acf2e5;hb=ed9a0a3e6d1af81cc07a54d4feebb8a01c451fb8;hp=84a306ca5fd532f0553e5e4766bfb7b37382ed4a;hpb=4d98e7c1df3aba3e38d0291bbe310aff52c3fc00;p=quassel.git diff --git a/src/uisupport/networkmodelactionprovider.cpp b/src/uisupport/networkmodelactionprovider.cpp index 84a306ca..6061e382 100644 --- a/src/uisupport/networkmodelactionprovider.cpp +++ b/src/uisupport/networkmodelactionprovider.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -504,10 +504,11 @@ void NetworkModelActionProvider::handleBufferAction(ActionType type, QAction *) void NetworkModelActionProvider::removeBuffers(const QModelIndexList &indexList) { QList inactive; foreach(QModelIndex index, indexList) { - if(!index.data(NetworkModel::ItemActiveRole).toBool()) { - BufferInfo info = index.data(NetworkModel::BufferInfoRole).value(); - if(info.isValid()) - inactive << info; + BufferInfo info = index.data(NetworkModel::BufferInfoRole).value(); + if(info.isValid()) { + if(info.type() == BufferInfo::QueryBuffer + || (info.type() == BufferInfo::ChannelBuffer && !index.data(NetworkModel::ItemActiveRole).toBool())) + inactive << info; } } QString msg;