[gnumeric] Always set the GO_DATA_HAS_VALUE flag when needed. [#595]



commit 64d84471dc1dbeb73e2cf1ad82cced5342406d0b
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sat Sep 25 16:40:39 2021 +0200

    Always set the GO_DATA_HAS_VALUE flag when needed. [#595]

 ChangeLog   | 5 +++++
 NEWS        | 1 +
 src/graph.c | 3 +++
 3 files changed, 9 insertions(+)
---
diff --git a/ChangeLog b/ChangeLog
index a18c70399..b184c7e38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-09-25  Jean Brefort  <jean brefort normalesup org>
+
+       * src/graph.c (gnm_go_data_vector_load_values): make sure that the
+       GO_DATA_HAS_VALUE flag is always set when needed. Fixes #595.
+
 2021-09-18  Jean Brefort  <jean brefort normalesup org>
 
        * src/graph.c (gnm_go_data_vector_get_value): fix error bars when data
diff --git a/NEWS b/NEWS
index ae97c2e2d..46dd1585a 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Gnumeric 1.12.51
 
 Jean:
        * Fix error bars when data are in a multi-column array. [#594]
+       * Always set the GO_DATA_HAS_VALUE flag when needed. [#595]
 
 Morten:
        * Fix --with-long-double configuration.
diff --git a/src/graph.c b/src/graph.c
index 163058056..793f3ae74 100644
--- a/src/graph.c
+++ b/src/graph.c
@@ -848,6 +848,9 @@ gnm_go_data_vector_load_values (GODataVector *dat)
        dat->minimum = minimum;
        dat->maximum = maximum;
        dat->base.flags |= GO_DATA_CACHE_IS_VALID;
+       if (go_finite (minimum) && go_finite (maximum) && minimum <= maximum)
+               dat->base.flags |= GO_DATA_HAS_VALUE;
+
 }
 
 static double


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