diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-07-29 23:19:05 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-07-29 23:19:05 +0000 |
| commit | f8d6de8e09c163181a6aea37ed11c0b84fe6293d (patch) | |
| tree | 7f2424afa221b4ff86a4626ccbaf161cd39c6577 /src/event-context.cpp | |
| parent | add more rotation snaps (diff) | |
| download | inkscape-f8d6de8e09c163181a6aea37ed11c0b84fe6293d.tar.gz inkscape-f8d6de8e09c163181a6aea37ed11c0b84fe6293d.zip | |
optionally zoom with mousewheel without modifiers
(bzr r3343)
Diffstat (limited to 'src/event-context.cpp')
| -rw-r--r-- | src/event-context.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/event-context.cpp b/src/event-context.cpp index 47c5fac26..c6192c4c3 100644 --- a/src/event-context.cpp +++ b/src/event-context.cpp @@ -600,6 +600,9 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context, } break; case GDK_SCROLL: + { + bool ctrl = (event->scroll.state & GDK_CONTROL_MASK); + bool wheelzooms = (prefs_get_int_attribute("options.wheelzooms","value", 0) == 1); /* shift + wheel, pan left--right */ if (event->scroll.state & GDK_SHIFT_MASK) { switch (event->scroll.direction) { @@ -614,7 +617,7 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context, } /* ctrl + wheel, zoom in--out */ - } else if (event->scroll.state & GDK_CONTROL_MASK) { + } else if ((ctrl && !wheelzooms) || (!ctrl && wheelzooms)) { double rel_zoom; switch (event->scroll.direction) { case GDK_SCROLL_UP: @@ -650,6 +653,7 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context, } } break; + } default: break; } |
