Code

improve interactivity by forcing redraws when thinning
authorbuliabyak <buliabyak@users.sourceforge.net>
Sat, 14 Apr 2007 17:58:26 +0000 (17:58 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sat, 14 Apr 2007 17:58:26 +0000 (17:58 +0000)
src/dyna-draw-context.cpp

index 3b5e94d2846245ec1182b3b2dbc44b42c0e4c306..3084e2cf038208fabfbc0899a4a3e8ae9b361822 100644 (file)
@@ -803,6 +803,10 @@ sp_dyna_draw_context_root_handler(SPEventContext *event_context,
                                     NULL,
                                     event->button.time);
 
+                if (event->motion.state & GDK_MOD1_MASK) {
+                    sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 3);
+                }
+
                 ret = TRUE;
 
                 dc->is_drawing = true;
@@ -1060,6 +1064,7 @@ sp_dyna_draw_context_root_handler(SPEventContext *event_context,
 
         if ( dc->is_dilating && event->button.button == 1 ) {
             dc->is_dilating = false;
+            sp_canvas_end_forced_full_redraws(desktop->canvas);
             sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(dc)->desktop), 
                          SP_VERB_CONTEXT_CALLIGRAPHIC,
                          (event->button.state & GDK_SHIFT_MASK ? _("Thicken paths") : _("Thin paths")));