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.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/ui/tools/zoom-tool.cpp b/src/ui/tools/zoom-tool.cpp
index 13e097c18..d40d2e969 100644
--- a/src/ui/tools/zoom-tool.cpp
+++ b/src/ui/tools/zoom-tool.cpp
@@ -21,7 +21,6 @@
#include "desktop.h"
#include "pixmaps/cursor-zoom.xpm"
#include "pixmaps/cursor-zoom-out.xpm"
-#include "preferences.h"
#include "selection-chemistry.h"
#include "ui/tools/zoom-tool.h"
@@ -104,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;
}
@@ -157,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;