From 29e005620b05165ffd5ad21c2a9751adac89d34a Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Tue, 21 Jan 2014 10:21:10 -0500 Subject: Move dragging undo block from tools-base to canvas. Regarding bug #168695 (bzr r12967) --- src/selection-chemistry.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/selection-chemistry.cpp') diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 1957b9297..3082a2fe4 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -56,6 +56,7 @@ SPCycleType SP_CYCLING = SP_CYCLE_FOCUS; #include "sp-polyline.h" #include "sp-line.h" #include "text-editing.h" +#include "display/sp-canvas.h" #include "ui/tools/text-tool.h" #include "ui/tools/connector-tool.h" #include "sp-path.h" @@ -1084,7 +1085,7 @@ void sp_undo(SPDesktop *desktop, SPDocument *) { // No re/undo while dragging, too dangerous. - if(desktop->getEventContext()->is_dragging) return; + if(desktop->getCanvas()->is_dragging) return; if (!DocumentUndo::undo(sp_desktop_document(desktop))) { desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Nothing to undo.")); @@ -1095,7 +1096,7 @@ void sp_redo(SPDesktop *desktop, SPDocument *) { // No re/undo while dragging, too dangerous. - if(desktop->getEventContext()->is_dragging) return; + if(desktop->getCanvas()->is_dragging) return; if (!DocumentUndo::redo(sp_desktop_document(desktop))) { desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Nothing to redo.")); -- cgit v1.2.3