[libchamplain: 6/10] Do not generate 0 size clutter textures for polygons
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain: 6/10] Do not generate 0 size clutter textures for polygons
- Date: Mon, 10 May 2010 21:55:42 +0000 (UTC)
commit bb20af808b59d9ffe9fb105a005c9f32b6199aa9
Author: JiÅ?Ã Techet <techet gmail com>
Date: Mon May 10 22:02:40 2010 +0200
Do not generate 0 size clutter textures for polygons
Fix at the right place...
Signed-off-by: JiÅ?Ã Techet <techet gmail com>
champlain/champlain-polygon.c | 2 +-
champlain/champlain-view.c | 4 ----
2 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/champlain/champlain-polygon.c b/champlain/champlain-polygon.c
index 6f3dded..99c356c 100644
--- a/champlain/champlain-polygon.c
+++ b/champlain/champlain-polygon.c
@@ -745,7 +745,7 @@ champlain_polygon_draw_polygon (ChamplainPolygon *polygon,
ClutterActor *cairo_texture;
cairo_t *cr;
- if (!priv->visible)
+ if (!priv->visible || width == 0 || height == 0)
return;
clutter_group_remove_all (CLUTTER_GROUP (polygon));
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index 1114e69..4977356 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -3172,10 +3172,6 @@ champlain_view_add_polygon (ChamplainView *view,
g_signal_connect (polygon, "notify",
G_CALLBACK (notify_polygon_cb), view);
-// if (priv->viewport_size.width == 0 ||
-// priv->viewport_size.height == 0)
-// return;
-
clutter_actor_set_position (CLUTTER_ACTOR (polygon), 0, 0);
clutter_container_add_actor (CLUTTER_CONTAINER (priv->polygon_layer),
CLUTTER_ACTOR (polygon));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]