summaryrefslogtreecommitdiffstats
path: root/src/nodepath.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-11-24 07:00:57 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-11-24 07:00:57 +0000
commitef015702fb970b78c473dfe4b3f7ae9100ea453c (patch)
tree2850ae47bcb8493c87230212c9c5c442b314c52e /src/nodepath.cpp
parentrename the effect (diff)
downloadinkscape-ef015702fb970b78c473dfe4b3f7ae9100ea453c.tar.gz
inkscape-ef015702fb970b78c473dfe4b3f7ae9100ea453c.zip
grow/shrink node selection by scrollwheel
(bzr r2026)
Diffstat (limited to 'src/nodepath.cpp')
-rw-r--r--src/nodepath.cpp35
1 files changed, 31 insertions, 4 deletions
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 59a6bcce3..e58a8b31d 100644
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
@@ -2864,6 +2864,33 @@ static gboolean node_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::No
case GDK_LEAVE_NOTIFY:
active_node = NULL;
break;
+ case GDK_SCROLL:
+ if ((event->scroll.state & GDK_CONTROL_MASK) && !(event->scroll.state & GDK_SHIFT_MASK)) { // linearly
+ switch (event->scroll.direction) {
+ case GDK_SCROLL_UP:
+ nodepath_grow_selection_linearly (n->subpath->nodepath, n, +1);
+ break;
+ case GDK_SCROLL_DOWN:
+ nodepath_grow_selection_linearly (n->subpath->nodepath, n, -1);
+ break;
+ default:
+ break;
+ }
+ ret = TRUE;
+ } else if (!(event->scroll.state & GDK_SHIFT_MASK)) { // spatially
+ switch (event->scroll.direction) {
+ case GDK_SCROLL_UP:
+ nodepath_grow_selection_spatially (n->subpath->nodepath, n, +1);
+ break;
+ case GDK_SCROLL_DOWN:
+ nodepath_grow_selection_spatially (n->subpath->nodepath, n, -1);
+ break;
+ default:
+ break;
+ }
+ ret = TRUE;
+ }
+ break;
case GDK_KEY_PRESS:
switch (get_group0_keyval (&event->key)) {
case GDK_space:
@@ -2875,16 +2902,16 @@ static gboolean node_event(SPKnot *knot, GdkEvent *event, Inkscape::NodePath::No
break;
case GDK_Page_Up:
if (event->key.state & GDK_CONTROL_MASK) {
- nodepath_grow_selection_spatially (n->subpath->nodepath, n, +1);
- } else {
nodepath_grow_selection_linearly (n->subpath->nodepath, n, +1);
+ } else {
+ nodepath_grow_selection_spatially (n->subpath->nodepath, n, +1);
}
break;
case GDK_Page_Down:
if (event->key.state & GDK_CONTROL_MASK) {
- nodepath_grow_selection_spatially (n->subpath->nodepath, n, -1);
- } else {
nodepath_grow_selection_linearly (n->subpath->nodepath, n, -1);
+ } else {
+ nodepath_grow_selection_spatially (n->subpath->nodepath, n, -1);
}
break;
default: