summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab9541d)
raw | patch | inline | side by side (parent: ab9541d)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 24 Aug 2007 02:24:09 +0000 (02:24 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Fri, 24 Aug 2007 02:24:09 +0000 (02:24 +0000) |
src/display/sp-canvas.cpp | patch | blob | history |
index e2550e8e76c12cdde339bd5c01ffb719a8041223..c185e1a1c3f16affbac4ecc87db0f918e46597bf 100644 (file)
@@ -202,8 +202,6 @@ sp_canvas_item_construct (SPCanvasItem *item, SPCanvasGroup *parent, const gchar
group_add (SP_CANVAS_GROUP (item->parent), item);
sp_canvas_item_request_update (item);
- sp_canvas_request_redraw (item->canvas, (int)(item->x1), (int)(item->y1), (int)(item->x2 + 1), (int)(item->y2 + 1));
- item->canvas->need_repick = TRUE;
}
/**
redraw_if_visible (SPCanvasItem *item)
{
if (item->flags & SP_CANVAS_ITEM_VISIBLE) {
- sp_canvas_request_redraw (item->canvas, (int)(item->x1), (int)(item->y1), (int)(item->x2 + 1), (int)(item->y2 + 1));
+ int x0 = (int)(item->x1);
+ int x1 = (int)(item->x2);
+ int y0 = (int)(item->y1);
+ int y1 = (int)(item->y2);
+
+ if (x0 !=0 || x1 !=0 || y0 !=0 || y1 !=0) {
+ sp_canvas_request_redraw (item->canvas, (int)(item->x1), (int)(item->y1), (int)(item->x2 + 1), (int)(item->y2 + 1));
+ }
}
}
item->flags |= SP_CANVAS_ITEM_VISIBLE;
- sp_canvas_request_redraw (item->canvas, (int)(item->x1), (int)(item->y1), (int)(item->x2 + 1), (int)(item->y2 + 1));
- item->canvas->need_repick = TRUE;
+ int x0 = (int)(item->x1);
+ int x1 = (int)(item->x2);
+ int y0 = (int)(item->y1);
+ int y1 = (int)(item->y2);
+
+ if (x0 !=0 || x1 !=0 || y0 !=0 || y1 !=0) {
+ sp_canvas_request_redraw (item->canvas, (int)(item->x1), (int)(item->y1), (int)(item->x2 + 1), (int)(item->y2 + 1));
+ item->canvas->need_repick = TRUE;
+ }
}
/**
item->flags &= ~SP_CANVAS_ITEM_VISIBLE;
- sp_canvas_request_redraw (item->canvas, (int)item->x1, (int)item->y1, (int)(item->x2 + 1), (int)(item->y2 + 1));
- item->canvas->need_repick = TRUE;
+ int x0 = (int)(item->x1);
+ int x1 = (int)(item->x2);
+ int y0 = (int)(item->y1);
+ int y1 = (int)(item->y2);
+
+ if (x0 !=0 || x1 !=0 || y0 !=0 || y1 !=0) {
+ sp_canvas_request_redraw (item->canvas, (int)item->x1, (int)item->y1, (int)(item->x2 + 1), (int)(item->y2 + 1));
+ item->canvas->need_repick = TRUE;
+ }
}
/**