Cabana: fix wrong hardcoded column index (#26392)

fix wrong column count
This commit is contained in:
Dean Lee
2022-11-07 03:03:57 +08:00
committed by GitHub
parent ac76cc9325
commit ea5587d1d1
+1 -1
View File
@@ -224,7 +224,7 @@ void MessageListModel::updateState(bool sort) {
changePersistentIndex(idx, index(std::distance(msgs.begin(), it), idx.column()));
}
}
emit dataChanged(index(0, 0), index(msgs.size() - 1, 3), {Qt::DisplayRole});
emit dataChanged(index(0, 0), index(msgs.size() - 1, columnCount() - 1), {Qt::DisplayRole});
}
}