Code

ensure that final resting position is included in calligraphic stroke
authormental <mental@users.sourceforge.net>
Mon, 4 Sep 2006 20:30:59 +0000 (20:30 +0000)
committermental <mental@users.sourceforge.net>
Mon, 4 Sep 2006 20:30:59 +0000 (20:30 +0000)
src/dyna-draw-context.cpp

index 7585232458ec7a1cead320dcd82a5d7744007f41..ad275de13f79d776d45435ecb1e61d7c93757f3d 100644 (file)
@@ -547,9 +547,14 @@ sp_dyna_draw_context_root_handler(SPEventContext *event_context,
     case GDK_BUTTON_RELEASE:
         sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), event->button.time);
         dc->is_drawing = false;
+
         if ( dc->dragging && event->button.button == 1 ) {
             dc->dragging = FALSE;
 
+            NR::Point const motion_w(event->button.x, event->button.y);
+            NR::Point const motion_dt(desktop->w2d(motion_w));
+            sp_dyna_draw_apply(dc, motion_dt);
+
             /* Remove all temporary line segments */
             while (dc->segments) {
                 gtk_object_destroy(GTK_OBJECT(dc->segments->data));