X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fbufferview.cpp;h=0ebfdea0ea15e76bf0589ad587cae70a24594f5b;hb=620882e248fafe97a736e545d8e3eb72569a078b;hp=380828d3d43308945612dd88f9f0d6453f662f84;hpb=597705d895583bd2860fc117a7c73aa5cf86ae52;p=quassel.git diff --git a/src/uisupport/bufferview.cpp b/src/uisupport/bufferview.cpp index 380828d3..0ebfdea0 100644 --- a/src/uisupport/bufferview.cpp +++ b/src/uisupport/bufferview.cpp @@ -24,6 +24,8 @@ #include "networkmodel.h" #include "network.h" +#include "uisettings.h" + /***************************************** * The TreeView showing the Buffers *****************************************/ @@ -222,6 +224,8 @@ void BufferView::showContextMenu(const QPoint &pos) { void BufferView::wheelEvent(QWheelEvent* event) { + UiSettings s; + if(s.value("MouseWheelChangesBuffers",QVariant(true)).toBool()) { int rowDelta = ( event->delta() > 0 ) ? -1 : 1; QModelIndex currentIndex = selectionModel()->currentIndex(); QModelIndex resultingIndex; @@ -242,5 +246,8 @@ void BufferView::wheelEvent(QWheelEvent* event) } selectionModel()->setCurrentIndex( resultingIndex, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows ); selectionModel()->select( resultingIndex, QItemSelectionModel::ClearAndSelect ); + } else { + QAbstractScrollArea::wheelEvent(event); + } }