summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/tool-base.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2017-03-21 09:14:44 +0000
committertavmjong-free <tavmjong@free.fr>2017-03-21 09:14:44 +0000
commit79c31e9b54e6a47502edb61d590cd50ab0536269 (patch)
tree5873fc0c4fb39e51f225dbc2393b5c124f94111c /src/ui/tools/tool-base.cpp
parentImplement rotation via desktop to window affine. (diff)
downloadinkscape-79c31e9b54e6a47502edb61d590cd50ab0536269.tar.gz
inkscape-79c31e9b54e6a47502edb61d590cd50ab0536269.zip
Add verbs for canvas rotation.
(bzr r15604)
Diffstat (limited to 'src/ui/tools/tool-base.cpp')
-rw-r--r--src/ui/tools/tool-base.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp
index 83291fcfd..389056762 100644
--- a/src/ui/tools/tool-base.cpp
+++ b/src/ui/tools/tool-base.cpp
@@ -759,26 +759,26 @@ bool ToolBase::root_handler(GdkEvent* event) {
if (ctrl & shift) {
/* ctrl + shift, rotate */
- double rel_rotate;
- double rotate_inc = 2.0 * M_PI/180.0;
+ double rotate_inc = prefs->getDoubleLimited(
+ "/options/rotateincrement/value", M_PI/90, M_PI/180, M_PI/4, "°" );
switch (event->scroll.direction) {
case GDK_SCROLL_UP:
- rel_rotate = rotate_inc;
+ // Do nothing
break;
case GDK_SCROLL_DOWN:
- rel_rotate = -rotate_inc;
+ rotate_inc = -rotate_inc;
break;
default:
- rel_rotate = 0.0;
+ rotate_inc = 0.0;
break;
}
- if (rel_rotate != 0.0) {
+ if (rotate_inc != 0.0) {
Geom::Point const scroll_dt = desktop->point();
- desktop->rotate_relative_keep_point(scroll_dt, rel_rotate);
+ desktop->rotate_relative_keep_point(scroll_dt, rotate_inc);
}
} else if (event->scroll.state & GDK_SHIFT_MASK) {