X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.cpp;h=797b008307b2c78b001ba105cd8fb3c8dee89130;hb=3202bf5340396b5c6b467e8d92d808b1cbbbf7fb;hp=3ab059a302dab5c967b7e3aa9b89633568790125;hpb=3013f4e095802e906c85878436da9e2ee3f9028c;p=quassel.git diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index 3ab059a3..797b0083 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2010 by the Quassel Project * + * Copyright (C) 2005-2012 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -24,6 +24,7 @@ #include #include #include +#include #include #ifdef HAVE_KDE @@ -429,7 +430,6 @@ void ChatScene::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e bool atTop = (start == 0); bool atBottom = (end == _lines.count() - 1); - bool moveTop = false; // clear selection if(_selectingItem) { @@ -459,7 +459,7 @@ void ChatScene::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e if(_selectionStart >= 0) { int offset = end - start + 1; if(_selectionStart >= start) - _selectionStart = qMax(_selectionStart -= offset, start); + _selectionStart = qMax(_selectionStart - offset, start); if(_selectionEnd >= start) _selectionEnd -= offset; if(_firstSelectionRow >= start) @@ -478,7 +478,6 @@ void ChatScene::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e int moveEnd = _lines.count() - 1; if(start < _lines.count() - start) { // move top part - moveTop = true; moveEnd = start - 1; } else { // move bottom part @@ -1017,14 +1016,6 @@ void ChatScene::updateSceneRect(const QRectF &rect) { update(); } -bool ChatScene::event(QEvent *e) { - if(e->type() == QEvent::ApplicationPaletteChange) { - _firstColHandle->setColor(QApplication::palette().windowText().color()); - _secondColHandle->setColor(QApplication::palette().windowText().color()); - } - return QGraphicsScene::event(e); -} - // ======================================== // Webkit Only stuff // ========================================