Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle pinch gesture event on Win 7 as mouse wheel event.

  • Loading branch information...
commit 49c2630c393b003a473263001a18e27144744178 1 parent af5de1b
till213 till213 authored unknown committed
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/Kernel/src/ScreeniePixmapItem.cpp
9 src/Kernel/src/ScreeniePixmapItem.cpp
View
@@ -196,7 +196,14 @@ void ScreeniePixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void ScreeniePixmapItem::wheelEvent(QGraphicsSceneWheelEvent *event)
{
- int value = event->delta() / 12;
+ int value;
+ // On Windows 7 pinch gestures are mapped to wheel events with CTRL pressed,
+ // also refer to: http://msdn.microsoft.com/en-us/library/dd940543%28v=vs.85%29.aspx
+ if (Qt::ControlModifier & event->modifiers()) {
+ value = -event->delta() / 12;
+ } else {
+ value = event->delta() / 12;
+ }
if (isInsidePixmap(event->pos())) {
addDistance(value);
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.