X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatscene.cpp;h=ef300497ed956076b80a2db24b7133fd39332e89;hp=e5537a054b3da285450b8779b4a2ade17b5c0d91;hb=b3cf44aa5773bb6a6e0a1ba8d0c1add841281b4b;hpb=98bec7bab038a8e656f90617c59fe1e8c0907f71 diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp index e5537a05..ef300497 100644 --- a/src/qtui/chatscene.cpp +++ b/src/qtui/chatscene.cpp @@ -429,7 +429,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 +458,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 +477,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