X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Ftreemodel.cpp;h=e560a7794f05ad043492f77170fbe7ae2700ca64;hp=19a68549d70905637c57469dcfb03bad88efc7d3;hb=f9fc50a5e043668a2525a6c0903ea339d4ba05b7;hpb=788fd0058595c815dc42597e9956c02aea45261f diff --git a/src/client/treemodel.cpp b/src/client/treemodel.cpp index 19a68549..e560a779 100644 --- a/src/client/treemodel.cpp +++ b/src/client/treemodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-07 by the Quassel IRC Team * + * Copyright (C) 2005-08 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -380,14 +380,20 @@ QVariant TreeModel::headerData(int section, Qt::Orientation orientation, int rol void TreeModel::itemDataChanged(int column) { AbstractTreeItem *item = qobject_cast(sender()); - QModelIndex itemIndex; + QModelIndex leftIndex, rightIndex; - if(item == rootItem) - itemIndex = QModelIndex(); - else - itemIndex = createIndex(item->row(), column, item); + if(item == rootItem) + return; + + if(column == -1) { + leftIndex = createIndex(item->row(), 0, item); + rightIndex = createIndex(item->row(), item->columnCount(), item); + } else { + leftIndex = createIndex(item->row(), column, item); + rightIndex = leftIndex; + } - emit dataChanged(itemIndex, itemIndex); + emit dataChanged(leftIndex, rightIndex); } void TreeModel::appendChild(AbstractTreeItem *parent, AbstractTreeItem *child) {