From 492462a3e79a3d6577e4b3a543ae059a4850267a Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Mon, 28 Aug 2017 22:32:36 +0200 Subject: handle scroll wheel scrolling in new ListControl Change-Id: I8dc68b674aabf446c4b949770ae066d41204efc3 Reviewed-on: https://gerrit.libreoffice.org/41680 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard --- svx/source/dialog/listctrl.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'svx') diff --git a/svx/source/dialog/listctrl.cxx b/svx/source/dialog/listctrl.cxx index 29a8b14410d3..b1ecaf5b8972 100644 --- a/svx/source/dialog/listctrl.cxx +++ b/svx/source/dialog/listctrl.cxx @@ -142,4 +142,17 @@ void ListControl::deleteEntry(sal_uInt32 nPos) RecalcAll(); } +bool ListControl::EventNotify( NotifyEvent& rNEvt ) +{ + if (rNEvt.GetType() == MouseNotifyEvent::COMMAND) + { + const CommandEvent* pEvent = rNEvt.GetCommandEvent(); + if (pEvent && pEvent->GetCommand() == CommandEventId::Wheel) + { + HandleScrollCommand(*pEvent, nullptr, mpScrollBar.get()); + } + } + return true; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit