summaryrefslogtreecommitdiffstats
path: root/src/display
diff options
context:
space:
mode:
Diffstat (limited to 'src/display')
-rw-r--r--src/display/sp-canvas.cpp5
-rw-r--r--src/display/sp-canvas.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp
index 455f628bc..d9640f763 100644
--- a/src/display/sp-canvas.cpp
+++ b/src/display/sp-canvas.cpp
@@ -1545,6 +1545,11 @@ int SPCanvasImpl::emitEvent(SPCanvas *canvas, GdkEvent *event)
default:
break;
}
+ // Block Undo and Redo while we drag /anything/
+ if(event->type == GDK_BUTTON_PRESS && event->button.button == 1)
+ canvas->is_dragging = true;
+ else if(event->type == GDK_BUTTON_RELEASE)
+ canvas->is_dragging = false;
// Choose where we send the event
diff --git a/src/display/sp-canvas.h b/src/display/sp-canvas.h
index b570b739e..72ae4b6bc 100644
--- a/src/display/sp-canvas.h
+++ b/src/display/sp-canvas.h
@@ -124,6 +124,7 @@ struct SPCanvas {
SPCanvasItem *root;
+ bool is_dragging;
double dx0;
double dy0;
int x0;