diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-08-24 04:15:47 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-08-24 04:15:47 +0000 |
| commit | e810759443749a784b050d0126111eca8645f2ed (patch) | |
| tree | 428800b555ef75ceef0e0cb2a79bab9a08a47d49 /src/display/sp-canvas.cpp | |
| parent | do not request redraw if an item has zero dimensions; also remove redundant r... (diff) | |
| download | inkscape-e810759443749a784b050d0126111eca8645f2ed.tar.gz inkscape-e810759443749a784b050d0126111eca8645f2ed.zip | |
a hack to prevent the redraw of the entire area when a no-fill ctrlrect is deleted
(bzr r3580)
Diffstat (limited to 'src/display/sp-canvas.cpp')
| -rw-r--r-- | src/display/sp-canvas.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index c185e1a1c..1e7b8051f 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -36,6 +36,7 @@ #include "prefs-utils.h" #include "box3d-context.h" #include "inkscape.h" +#include "sodipodi-ctrlrect.h" // Define this to visualize the regions to be redrawn //#define DEBUG_REDRAW 1; @@ -230,7 +231,15 @@ sp_canvas_item_dispose (GObject *object) { SPCanvasItem *item = SP_CANVAS_ITEM (object); - redraw_if_visible (item); + // Hack: if this is a ctrlrect, move it to 0,0; + // this redraws only the stroke of the rect to be deleted, + // avoiding redraw of the entire area + if (SP_IS_CTRLRECT(item)) { + SP_CTRLRECT(object)->setRectangle(NR::Rect(NR::Point(0,0),NR::Point(0,0))); + SP_CTRLRECT(object)->update(item->xform, 0); + } else { + redraw_if_visible (item); + } item->flags &= ~SP_CANVAS_ITEM_VISIBLE; if (item == item->canvas->current_item) { @@ -2276,7 +2285,7 @@ static void sp_canvas_dirty_rect(SPCanvas* canvas, int nl, int nt, int nr, int n } /** - * Helper that marks specific canvas rectangle for redraw + * Helper that marks specific canvas rectangle as clean (val == 0) or dirty (otherwise) */ void sp_canvas_mark_rect(SPCanvas* canvas, int nl, int nt, int nr, int nb, uint8_t val) { |
