Code

Fix ef spam when adjusting pattern on text - patch from Adonis Papaderos
[inkscape.git] / src / eraser-context.cpp
index 8854dbcec9e65241b6852b6fa79cf1b5b9bc2d50..9b00dcd036eaa13ed3ba3b1a7d4b22bc3ad217f1 100644 (file)
@@ -43,7 +43,6 @@
 #include "desktop.h"
 #include "desktop-events.h"
 #include "desktop-handles.h"
-#include "desktop-affine.h"
 #include "desktop-style.h"
 #include "message-context.h"
 #include "preferences.h"
@@ -577,10 +576,13 @@ sp_eraser_context_root_handler(SPEventContext *event_context,
                 dc->repr = NULL;
             }
 
-            Inkscape::Rubberband::get(desktop)->stop();
             dc->_message_context->clear();
             ret = TRUE;
         }
+        if (Inkscape::Rubberband::get(desktop)->is_started()) {
+            Inkscape::Rubberband::get(desktop)->stop();
+        }
+            
         break;
     }
 
@@ -727,7 +729,7 @@ set_to_accumulated(SPEraserContext *dc)
             item->transform = sp_item_i2doc_affine(SP_ITEM(desktop->currentLayer())).inverse();
             item->updateRepr();
         }
-        Geom::PathVector pathv = dc->accumulated->get_pathvector() * sp_desktop_dt2doc_affine(desktop);
+        Geom::PathVector pathv = dc->accumulated->get_pathvector() * desktop->dt2doc();
         gchar *str = sp_svg_write_path(pathv);
         g_assert( str != NULL );
         dc->repr->setAttribute("d", str);
@@ -750,7 +752,7 @@ set_to_accumulated(SPEraserContext *dc)
                 if ( eraserMode ) {
                     toWorkOn = sp_document_partial_items_in_box(sp_desktop_document(desktop), desktop->dkey, bounds);
                 } else {
-                    Inkscape::Rubberband::Rubberband *r = Inkscape::Rubberband::get(desktop);
+                    Inkscape::Rubberband *r = Inkscape::Rubberband::get(desktop);
                     toWorkOn = sp_document_items_at_points(sp_desktop_document(desktop), desktop->dkey, r->getPoints());
                 }
                 toWorkOn = g_slist_remove( toWorkOn, acid );
@@ -1072,4 +1074,4 @@ draw_temporary_box(SPEraserContext *dc)
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :