[baobab] baobab-ringschart: fix visibility of outmost items
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab] baobab-ringschart: fix visibility of outmost items
- Date: Thu, 15 Mar 2012 21:09:03 +0000 (UTC)
commit 693bc1b3c9e7ed9606418498b97da98ec16566cf
Author: Stefano Facchini <stefano facchini gmail com>
Date: Thu Mar 15 21:45:13 2012 +0100
baobab-ringschart: fix visibility of outmost items
Small errors due to finite precision can sum up and lead to
a max radius for outmost items slightly bigger than max radius
of the chart, making those items invisible. Avoid this by using
the discrete item depth instead.
src/baobab-ringschart.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/baobab-ringschart.c b/src/baobab-ringschart.c
index 8f10abe..c5ee034 100644
--- a/src/baobab-ringschart.c
+++ b/src/baobab-ringschart.c
@@ -264,7 +264,7 @@ baobab_ringschart_calculate_item_geometry (BaobabChart *chart,
data->min_radius = (item->depth) * thickness;
- if (data->min_radius + thickness > max_radius)
+ if (item->depth > max_depth)
return;
else
data->max_radius = data->min_radius + thickness;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]