diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-08-24 01:58:15 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-08-24 01:58:15 +0000 |
| commit | 1d5687d2f4fbc34c5a6bd1c6ed71fd091821300b (patch) | |
| tree | f43830cac69f1aeda43958120c0cf7461e217181 /src/display/sodipodi-ctrl.cpp | |
| parent | third patch from Dennis Lin (with my tweaks) - great simplification and optim... (diff) | |
| download | inkscape-1d5687d2f4fbc34c5a6bd1c6ed71fd091821300b.tar.gz inkscape-1d5687d2f4fbc34c5a6bd1c6ed71fd091821300b.zip | |
do not redraw until moved for the first time; this fixes the flicker at 0,0 whenever a new ctrl is created
(bzr r3577)
Diffstat (limited to 'src/display/sodipodi-ctrl.cpp')
| -rw-r--r-- | src/display/sodipodi-ctrl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/display/sodipodi-ctrl.cpp b/src/display/sodipodi-ctrl.cpp index 71786fd96..27f53633c 100644 --- a/src/display/sodipodi-ctrl.cpp +++ b/src/display/sodipodi-ctrl.cpp @@ -104,6 +104,7 @@ sp_ctrl_init (SPCtrl *ctrl) ctrl->stroked = 0; ctrl->fill_color = 0x000000ff; ctrl->stroke_color = 0x000000ff; + ctrl->_moved = false; ctrl->box.x0 = ctrl->box.y0 = ctrl->box.x1 = ctrl->box.y1 = 0; ctrl->cache = NULL; @@ -204,6 +205,8 @@ sp_ctrl_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int flags sp_canvas_item_reset_bounds (item); + if (!ctrl->_moved) return; + if (ctrl->shown) { sp_canvas_request_redraw (item->canvas, ctrl->box.x0, ctrl->box.y0, ctrl->box.x1 + 1, ctrl->box.y1 + 1); } @@ -491,4 +494,5 @@ sp_ctrl_render (SPCanvasItem *item, SPCanvasBuf *buf) void SPCtrl::moveto (NR::Point const p) { sp_canvas_item_affine_absolute (SP_CANVAS_ITEM (this), NR::Matrix(NR::translate (p))); + _moved = true; } |
