summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/zoom-tool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/tools/zoom-tool.cpp')
-rw-r--r--src/ui/tools/zoom-tool.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/ui/tools/zoom-tool.cpp b/src/ui/tools/zoom-tool.cpp
index ca42d2d6f..d40d2e969 100644
--- a/src/ui/tools/zoom-tool.cpp
+++ b/src/ui/tools/zoom-tool.cpp
@@ -103,12 +103,14 @@ bool ZoomTool::root_handler(GdkEvent* event) {
desktop->zoom_relative_keep_point(button_dt, zoom_rel);
ret = true;
}
-
- sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
- GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK,
- NULL, event->button.time);
- this->grabbed = SP_CANVAS_ITEM(desktop->acetate);
+ sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
+ GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK |
+ GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK,
+ NULL, event->button.time);
+
+ this->grabbed = SP_CANVAS_ITEM(desktop->acetate);
break;
}
@@ -156,10 +158,10 @@ bool ZoomTool::root_handler(GdkEvent* event) {
Inkscape::Rubberband::get(desktop)->stop();
- if (this->grabbed) {
- sp_canvas_item_ungrab(this->grabbed, event->button.time);
- this->grabbed = NULL;
- }
+ if (this->grabbed) {
+ sp_canvas_item_ungrab(this->grabbed, event->button.time);
+ this->grabbed = NULL;
+ }
xp = yp = 0;
escaped = false;