Mercurial > octave
changeset 30521:7bf5bee84c1f stable
QtHandlesUtils.cc: Add missing macro check for QWheelEvent::angleDelta.
QtHandlesUtils.cc (makeScrollEventStruct): Add missing macro check for
QWheelEvent::angleDelta.
author | Gene Harvey <gharveymn@gmail.com> |
---|---|
date | Mon, 27 Sep 2021 13:41:50 -0500 |
parents | ab00b8b7355f |
children | 5822bd9d59f1 |
files | libgui/graphics/QtHandlesUtils.cc |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/QtHandlesUtils.cc Mon Sep 27 09:49:52 2021 -0500 +++ b/libgui/graphics/QtHandlesUtils.cc Mon Sep 27 13:41:50 2021 -0500 @@ -402,7 +402,11 @@ // We assume a standard mouse with 15 degree steps and Qt returns // 1/8 of a degree. +#if defined (HAVE_QWHEELEVENT_ANGLEDELTA) int ydelta = -(event->angleDelta().y ()); +#else + int ydelta = -(event->delta ()); +#endif retval.setfield ("VerticalScrollCount", octave_value (ydelta / 120)); // FIXME: Is there any way to access the number of lines a scroll step