diff options
Diffstat (limited to 'src/ui/tools/eraser-tool.cpp')
| -rw-r--r-- | src/ui/tools/eraser-tool.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/ui/tools/eraser-tool.cpp b/src/ui/tools/eraser-tool.cpp index 6b32b5901..d18db8266 100644 --- a/src/ui/tools/eraser-tool.cpp +++ b/src/ui/tools/eraser-tool.cpp @@ -24,8 +24,6 @@ #define noERASER_VERBOSE -#include "config.h" - #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> #include <glibmm/i18n.h> @@ -38,7 +36,6 @@ #include "display/canvas-bpath.h" #include <2geom/bezier-utils.h> -#include <glib.h> #include "macros.h" #include "document.h" #include "selection.h" @@ -47,26 +44,18 @@ #include "desktop-style.h" #include "message-context.h" -#include "preferences.h" #include "pixmaps/cursor-eraser.xpm" -#include "xml/repr.h" #include "context-fns.h" -#include "sp-item.h" -#include "color.h" #include "rubberband.h" #include "splivarot.h" #include "sp-item-group.h" #include "sp-shape.h" #include "sp-path.h" #include "sp-text.h" -#include "display/canvas-bpath.h" #include "display/canvas-arena.h" -#include "livarot/Shape.h" #include "document-undo.h" #include "verbs.h" #include "style.h" -#include "style-enums.h" -#include <2geom/math-utils.h> #include <2geom/pathvector.h> #include "path-chemistry.h" #include "display/curve.h" @@ -692,7 +681,7 @@ void EraserTool::set_to_accumulated() { } } } else { - toWorkOn = selection->itemList(); + toWorkOn.insert(toWorkOn.end(), selection->items().begin(), selection->items().end()); } wasSelection = true; } @@ -708,7 +697,6 @@ void EraserTool::set_to_accumulated() { item->deleteObject(true); sp_object_unref(item); workDone = true; - workDone = true; } else if (SP_IS_GROUP(item) || use ) { /*Do nothing*/ } else { @@ -719,7 +707,7 @@ void EraserTool::set_to_accumulated() { Inkscape::GC::release(dup); // parent takes over selection->set(dup); if (!this->nowidth) { - sp_selected_path_union_skip_undo(selection, desktop); + sp_selected_path_union_skip_undo(selection); } selection->add(item); if(item->style->fill_rule.value == SP_WIND_RULE_EVENODD){ @@ -730,9 +718,9 @@ void EraserTool::set_to_accumulated() { css = 0; } if (this->nowidth) { - sp_selected_path_cut_skip_undo(selection, desktop); + sp_selected_path_cut_skip_undo(selection); } else { - sp_selected_path_diff_skip_undo(selection, desktop); + sp_selected_path_diff_skip_undo(selection); } workDone = true; // TODO set this only if something was cut. bool break_apart = prefs->getBool("/tools/eraser/break_apart", false); @@ -745,7 +733,7 @@ void EraserTool::set_to_accumulated() { } if ( !selection->isEmpty() ) { // If the item was not completely erased, track the new remainder. - std::vector<SPItem*> nowSel(selection->itemList()); + std::vector<SPItem*> nowSel(selection->items().begin(), selection->items().end()); for (std::vector<SPItem*>::const_iterator i2 = nowSel.begin();i2!=nowSel.end();++i2) { remainingItems.push_back(*i2); } |
