Bring back highlights
[quassel.git] / src / qtui / chatline.cpp
index 5c8f1cf..5f03d9d 100644 (file)
@@ -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();