[goffice] Fix elements number in polar plot series. [#720355]



commit 05333809c7fa7335b4c5702a01363cfa8f1275c3
Author: Jean Brefort <jean brefort normalesup org>
Date:   Fri Dec 13 14:54:31 2013 +0100

    Fix elements number in polar plot series. [#720355]

 ChangeLog                      |    5 +++++
 NEWS                           |    1 +
 plugins/plot_radar/gog-radar.c |    6 ++++++
 3 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4005886..1827265 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-13  Jean Brefort  <jean brefort normalesup org>
+
+       * plugins/plot_radar/gog-radar.c (gog_rt_series_update): fix elements
+       number in polar plot series. [#720355]
+
 2013-12-12  Morten Welinder  <terra gnome org>
 
        * goffice/math/go-complex.c (go_complex_pow): Improve prevention
diff --git a/NEWS b/NEWS
index e61c66d..beab22e 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ goffice 0.10.10:
 Jean
        * Fix graph guru appearance when used with gtk+-3.10. [#719681]
        * Fix crasher in box plots. [#720310]
+       * Fix elements number in polar plot series. [#720355]
 
 Morten:
        * Improve complex math, notably complex power.
diff --git a/plugins/plot_radar/gog-radar.c b/plugins/plot_radar/gog-radar.c
index ffdcd3c..3bcb466 100644
--- a/plugins/plot_radar/gog-radar.c
+++ b/plugins/plot_radar/gog-radar.c
@@ -1192,6 +1192,12 @@ gog_rt_series_update (GogObject *obj)
                vals = go_data_get_values (series->base.values[1].data);
                len = go_data_get_vector_size (series->base.values[1].data);
        }
+       if (GOG_IS_POLAR_SERIES (obj) && series->base.values[0].data != NULL)
+       {
+               unsigned alen = go_data_get_vector_size (series->base.values[0].data);
+               if (alen < len)
+                       len = alen;
+       }
        series->base.num_elements = len;
 
        /* queue plot and axis for redraw */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]