summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8b27665)
raw | patch | inline | side by side (parent: 8b27665)
author | joncruz <joncruz@users.sourceforge.net> | |
Sun, 27 Apr 2008 08:41:25 +0000 (08:41 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sun, 27 Apr 2008 08:41:25 +0000 (08:41 +0000) |
src/eraser-context.cpp | patch | blob | history |
diff --git a/src/eraser-context.cpp b/src/eraser-context.cpp
index 3d142a9d0365584468cd42300d156cdce366485c..c787f0799bcf00ccdb2e1d824ef4daec8eaaf1f7 100644 (file)
--- a/src/eraser-context.cpp
+++ b/src/eraser-context.cpp
set_to_accumulated(SPEraserContext *dc)
{
SPDesktop *desktop = SP_EVENT_CONTEXT(dc)->desktop;
+ bool workDone = false;
if (!sp_curve_empty(dc->accumulated)) {
NArtBpath *abp;
selection->set(item);
selection->add(dup);
sp_selected_path_diff_skip_undo();
+ workDone = true; // TODO set this only if something was cut.
if ( !selection->isEmpty() ) {
// If the item was not completely erased, add it back to the selection.
GSList const *selected2 = g_slist_copy(const_cast<GSList *>(selection->itemList()));
}
}
- sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_ERASER,
- _("Draw eraser stroke"));
+
+ if ( workDone ) {
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_ERASER,
+ _("Draw eraser stroke"));
+ } else {
+ sp_document_cancel(sp_desktop_document(desktop));
+ }
}
static void