diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-03-04 19:19:00 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-03-04 19:19:00 +0000 |
| commit | 70f07d3a84ebcc213420c8028a2bc3d1dd4110d4 (patch) | |
| tree | a9414b722ff5dc1948e4434ec17f1b6f6e919942 /src/path-chemistry.cpp | |
| parent | Remove regex hack added in 14650 (diff) | |
| download | inkscape-70f07d3a84ebcc213420c8028a2bc3d1dd4110d4.tar.gz inkscape-70f07d3a84ebcc213420c8028a2bc3d1dd4110d4.zip | |
Fix for bug 415471 and 1553182 related to undo with eraser tool
Fixed bugs:
- https://launchpad.net/bugs/1553182
(bzr r14688)
Diffstat (limited to '')
| -rw-r--r-- | src/path-chemistry.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index 7b52ac2e1..15d3f0f99 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -52,7 +52,7 @@ inline bool less_than_items(SPItem const *first, SPItem const *second) } void -sp_selected_path_combine(SPDesktop *desktop) +sp_selected_path_combine(SPDesktop *desktop, bool skip_undo) { Inkscape::Selection *selection = desktop->getSelection(); SPDocument *doc = desktop->getDocument(); @@ -172,10 +172,10 @@ sp_selected_path_combine(SPDesktop *desktop) // move to the position of the topmost, reduced by the number of deleted items repr->setPosition(position > 0 ? position : 0); - - DocumentUndo::done(desktop->getDocument(), SP_VERB_SELECTION_COMBINE, - _("Combine")); - + if ( !skip_undo ) { + DocumentUndo::done(desktop->getDocument(), SP_VERB_SELECTION_COMBINE, + _("Combine")); + } selection->set(repr); Inkscape::GC::release(repr); @@ -188,7 +188,7 @@ sp_selected_path_combine(SPDesktop *desktop) } void -sp_selected_path_break_apart(SPDesktop *desktop) +sp_selected_path_break_apart(SPDesktop *desktop, bool skip_undo) { Inkscape::Selection *selection = desktop->getSelection(); @@ -283,8 +283,10 @@ sp_selected_path_break_apart(SPDesktop *desktop) desktop->clearWaitingCursor(); if (did) { - DocumentUndo::done(desktop->getDocument(), SP_VERB_SELECTION_BREAK_APART, - _("Break apart")); + if ( !skip_undo ) { + DocumentUndo::done(desktop->getDocument(), SP_VERB_SELECTION_BREAK_APART, + _("Break apart")); + } } else { desktop->getMessageStack()->flash(Inkscape::ERROR_MESSAGE, _("<b>No path(s)</b> to break apart in the selection.")); } |
