X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Ftreemodel.cpp;h=e560a7794f05ad043492f77170fbe7ae2700ca64;hp=ec6ce7af5ac4672ef7d20571d6027e81fc8c4420;hb=50706d89d4d60e258ebb6873d3778383621898e4;hpb=fd7c2c4a41b5bb9cffcfe7a8f86a28ab7f38ac27 diff --git a/src/client/treemodel.cpp b/src/client/treemodel.cpp index ec6ce7af..e560a779 100644 --- a/src/client/treemodel.cpp +++ b/src/client/treemodel.cpp @@ -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) {