X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatline.cpp;h=5f03d9d09a74b52cf363cecbb38c9b10c2913c76;hp=5c8f1cf32b4a6761e48e821bd055628ba05a7b67;hb=8301c4e1ac95ae0462f91cc0e4a90ba2efa5cc45;hpb=7c656c77a85636c47d272996df67b9c55f862906 diff --git a/src/qtui/chatline.cpp b/src/qtui/chatline.cpp index 5c8f1cf3..5f03d9d0 100644 --- a/src/qtui/chatline.cpp +++ b/src/qtui/chatline.cpp @@ -35,6 +35,8 @@ ChatLine::ChatLine(const QModelIndex &index, QGraphicsItem *parent) : QGraphicsI _timestampItem->setPos(0,0); _width = _height = 0; _selection = 0; + + if(_contentsItem->data(MessageModel::FlagsRole).toInt() & Message::Highlight) setHighlighted(true); } ChatLine::~ChatLine() { @@ -82,9 +84,8 @@ void ChatLine::setSelected(bool selected, ChatLineModel::ColumnType minColumn) { for(int i = minColumn; i <= ChatLineModel::ContentsColumn; i++) item((ChatLineModel::ColumnType)i)->setFullSelection(); update(); } - } - else { - quint8 sel = _selection &= 0x80; + } else { + quint8 sel = _selection & 0x80; if(sel != _selection) { _selection = sel; for(int i = 0; i <= ChatLineModel::ContentsColumn; i++) item((ChatLineModel::ColumnType)i)->clearSelection();