summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4f076d6)
raw | patch | inline | side by side (parent: 4f076d6)
author | johncoswell <johncoswell@users.sourceforge.net> | |
Sun, 24 Sep 2006 22:24:25 +0000 (22:24 +0000) | ||
committer | johncoswell <johncoswell@users.sourceforge.net> | |
Sun, 24 Sep 2006 22:24:25 +0000 (22:24 +0000) |
diff --git a/src/arc-context.cpp b/src/arc-context.cpp
index 0b0aad79e563890d2fcea8120b8a992e920f0593..934995b0a4fc6a0977dab22dafd2e7df102fd77d 100644 (file)
--- a/src/arc-context.cpp
+++ b/src/arc-context.cpp
Inkscape::GC::release(repr);
ac->item->transform = SP_ITEM(desktop->currentRoot())->getRelativeTransform(desktop->currentLayer());
ac->item->updateRepr();
+
+ sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
}
NR::Rect const r = Inkscape::snap_rectangular_box(desktop, ac->item, pt, ac->center, state);
SP_OBJECT(ac->item)->updateRepr();
+ sp_canvas_end_forced_full_redraws(desktop->canvas);
+
sp_desktop_selection(desktop)->set(ac->item);
sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_ARC,
_("Create ellipse"));
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index 96140a06cd2b7c2cd0f3d4ed181d742c826fcafb..ab933fbbf7aea7024fee6a4c1b76735e91451e9a 100644 (file)
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
pc->_message_context->clear();
pc->_message_context->flash(Inkscape::NORMAL_MESSAGE, _("Drawing cancelled"));
- //sp_canvas_clear_forced_full_redraws(pc->desktop->canvas);
+ sp_canvas_end_forced_full_redraws(pc->desktop->canvas);
}
/**
pc->p[1] = p;
pc->npoints = 2;
sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(pc->red_bpath), NULL);
+
+ sp_canvas_force_full_redraw_after_interruptions(pc->desktop->canvas, 5);
}
static void
@@ -1036,8 +1038,6 @@ spdc_pen_set_subsequent_point(SPPenContext *const pc, NR::Point const p, bool st
g_assert( pc->npoints != 0 );
/* todo: Check callers to see whether 2 <= npoints is guaranteed. */
- //sp_canvas_force_full_redraws(pc->desktop->canvas, 4);
-
pc->p[2] = p;
pc->p[3] = p;
pc->p[4] = p;
pc->green_anchor = sp_draw_anchor_destroy(pc->green_anchor);
}
- //sp_canvas_clear_forced_full_redraws(desktop->canvas);
+
+ sp_canvas_end_forced_full_redraws(pc->desktop->canvas);
pen_enable_events(pc);
}
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index b03cdeead7c08dc5aee4bd0a3be52900a8587bfc..f1494646341f08b87dba252a36bb5bf943f7b77e 100644 (file)
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
Inkscape::GC::release(repr);
rc.item->transform = SP_ITEM(desktop->currentRoot())->getRelativeTransform(desktop->currentLayer());
rc.item->updateRepr();
+
+ sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
}
NR::Rect const r = Inkscape::snap_rectangular_box(desktop, rc.item, pt, rc.center, state);
rc->_message_context->clear();
if ( rc->item != NULL ) {
- SPDesktop * dt;
+ SPDesktop * desktop;
- dt = SP_EVENT_CONTEXT_DESKTOP(rc);
+ desktop = SP_EVENT_CONTEXT_DESKTOP(rc);
SP_OBJECT(rc->item)->updateRepr();
- sp_desktop_selection(dt)->set(rc->item);
- sp_document_done(sp_desktop_document(dt), SP_VERB_CONTEXT_RECT,
+ sp_canvas_end_forced_full_redraws(desktop->canvas);
+
+ sp_desktop_selection(desktop)->set(rc->item);
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_RECT,
_("Create rectangle"));
rc->item = NULL;
diff --git a/src/rubberband.cpp b/src/rubberband.cpp
index cc0e70a7444c564dc72cacd8e58f3288b33ead26..b6211c519bafcc1c85517b45ce09470c24f8f872 100644 (file)
--- a/src/rubberband.cpp
+++ b/src/rubberband.cpp
stop();
_desktop = d;
_start = p;
+
+ sp_canvas_force_full_redraw_after_interruptions(_desktop->canvas, 5);
}
void Inkscape::Rubberband::stop()
if (_canvas) {
gtk_object_destroy((GtkObject *) _canvas);
_canvas = NULL;
+ sp_canvas_end_forced_full_redraws(_desktop->canvas);
}
}
diff --git a/src/select-context.cpp b/src/select-context.cpp
index 7efd013ec99edeecc6b68b9eaf8d463a2853dfba..c527471f5a22c093da8c24bce6f9cbb5b95a1a2c 100644 (file)
--- a/src/select-context.cpp
+++ b/src/select-context.cpp
@@ -318,6 +318,8 @@ sp_select_context_item_handler(SPEventContext *event_context, SPItem *item, GdkE
sc->dragging = TRUE;
sc->moved = FALSE;
+ sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
+
// remember the clicked item in sc->item:
sc->item = sp_event_context_find_item (desktop,
NR::Point(event->button.x, event->button.y), event->button.state & GDK_MOD1_MASK, FALSE);
@@ -331,6 +333,8 @@ sp_select_context_item_handler(SPEventContext *event_context, SPItem *item, GdkE
NULL, event->button.time);
sc->grabbed = SP_CANVAS_ITEM(desktop->drawing);
+ sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
+
ret = TRUE;
}
} else if (event->button.button == 3) {
desktop->setCurrentLayer(reinterpret_cast<SPObject *>(clicked_item));
sp_desktop_selection(desktop)->clear();
sc->dragging = false;
+
+ sp_canvas_end_forced_full_redraws(desktop->canvas);
} else { // switch tool
tools_switch_by_item (desktop, clicked_item);
}
// motion notify coordinates as given (no snapping back to origin)
within_tolerance = false;
- if (sc->button_press_ctrl || sc->button_press_alt) // if ctrl or alt was pressed and it's not click, we want to drag rather than rubberband
+ if (sc->button_press_ctrl || sc->button_press_alt) {
+ // if ctrl or alt was pressed and it's not click, we want to drag rather than rubberband
sc->dragging = TRUE;
+ sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
+ }
+
if (sc->dragging) {
/* User has dragged fast, so we get events on root (lauris)*/
// not only that; we will end up here when ctrl-dragging as well
ret = TRUE;
} else {
sc->dragging = FALSE;
+
+ sp_canvas_end_forced_full_redraws(desktop->canvas);
}
} else {
Inkscape::Rubberband::get()->move(p);
}
}
sc->dragging = FALSE;
+
+ sp_canvas_end_forced_full_redraws(desktop->canvas);
+
if (sc->item) {
sp_object_unref( SP_OBJECT(sc->item), NULL);
}
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index 1dc6bd6cbbd9064e8a89ef8b2cc35a075477452c..348cd88118bbfd440cfbcbdbd9a8fe4c276a865c 100644 (file)
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
Inkscape::GC::release(repr);
sc->item->transform = SP_ITEM(desktop->currentRoot())->getRelativeTransform(desktop->currentLayer());
sc->item->updateRepr();
+
+ sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
}
NR::Point const p0 = sp_desktop_dt2root_xy_point(desktop, sc->center);
sp_shape_set_shape(SP_SHAPE(spiral));
SP_OBJECT(spiral)->updateRepr(NULL, SP_OBJECT_WRITE_EXT);
+ sp_canvas_end_forced_full_redraws(desktop->canvas);
+
sp_desktop_selection(desktop)->set(sc->item);
sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_SPIRAL,
/* TODO: annotate */ "spiral-context.cpp:462");
diff --git a/src/star-context.cpp b/src/star-context.cpp
index 74b252860ee13c083eec82d085e8abb5f9573f9b..3147dd213fc8d596657b070da5d088e6b3665942 100644 (file)
--- a/src/star-context.cpp
+++ b/src/star-context.cpp
Inkscape::GC::release(repr);
sc->item->transform = SP_ITEM(desktop->currentRoot())->getRelativeTransform(desktop->currentLayer());
sc->item->updateRepr();
+
+ sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
}
NR::Point const p0 = sp_desktop_dt2root_xy_point(desktop, sc->center);
object->updateRepr(NULL, SP_OBJECT_WRITE_EXT);
+ sp_canvas_end_forced_full_redraws(desktop->canvas);
+
sp_desktop_selection(desktop)->set(sc->item);
sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_STAR,
/* TODO: annotate */ "star-context.cpp:474");