summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/tool-base.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-11-06 20:10:58 +0000
committerjabiertxof <info@marker.es>2016-11-06 20:10:58 +0000
commitf18cdd20ca7d36fb3b67b4c4b1ae9b315791e02e (patch)
treebbf10fe2a6423c50dc57458eba2c15624b55c16e /src/ui/tools/tool-base.cpp
parentAdd exporters (diff)
downloadinkscape-f18cdd20ca7d36fb3b67b4c4b1ae9b315791e02e.tar.gz
inkscape-f18cdd20ca7d36fb3b67b4c4b1ae9b315791e02e.zip
Fix a bug that allow to enter rotate mode with right click
(bzr r15142.1.33)
Diffstat (limited to 'src/ui/tools/tool-base.cpp')
-rw-r--r--src/ui/tools/tool-base.cpp39
1 files changed, 15 insertions, 24 deletions
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp
index 6acbe9f9f..fba9ae94f 100644
--- a/src/ui/tools/tool-base.cpp
+++ b/src/ui/tools/tool-base.cpp
@@ -406,34 +406,25 @@ bool ToolBase::root_handler(GdkEvent* event) {
break;
case 3:
- if (event->button.state & GDK_CONTROL_MASK) {
- sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time);
- desktop->canvas->startRotateTo(desktop->namedview->document_rotation);
- this->rotating_mode = true;
- this->message_context->set(Inkscape::INFORMATION_MESSAGE,
- _("<b>Space+ALT+mouse move</b> to rotate canvas"));
- } else {
- if ((event->button.state & GDK_SHIFT_MASK) || (event->button.state & GDK_CONTROL_MASK)) {
- // When starting panning, make sure there are no snap events pending because these might disable the panning again
- if (_uses_snap) {
- sp_event_context_discard_delayed_snap_event(this);
- }
- panning = 3;
+ if ((event->button.state & GDK_SHIFT_MASK) || (event->button.state & GDK_CONTROL_MASK)) {
+ // When starting panning, make sure there are no snap events pending because these might disable the panning again
+ if (_uses_snap) {
+ sp_event_context_discard_delayed_snap_event(this);
+ }
+ panning = 3;
- sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
- GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK
- | GDK_POINTER_MOTION_HINT_MASK, NULL,
- event->button.time);
+ sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
+ GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK
+ | GDK_POINTER_MOTION_HINT_MASK, NULL,
+ event->button.time);
- ret = TRUE;
- } else if( !this->space_panning) {
- sp_event_root_menu_popup(desktop, NULL, event);
- }
- desktop->canvas->clearRotateTo();
- this->rotating_mode = false;
ret = TRUE;
- desktop->canvas->endRotateTo();
+ } else if( !this->space_panning) {
+ sp_event_root_menu_popup(desktop, NULL, event);
}
+ desktop->canvas->clearRotateTo();
+ this->rotating_mode = false;
+ ret = TRUE;
break;
default: