[goffice] Make GODavaScalarVal compatible with go_data_has_value().
- From: Jean Bréfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Make GODavaScalarVal compatible with go_data_has_value().
- Date: Mon, 13 Apr 2015 12:53:03 +0000 (UTC)
commit dc438c55df48db28cfdecee1bfa6d31893d0561b
Author: Jean Brefort <jean brefort normalesup org>
Date: Mon Apr 13 14:51:31 2015 +0200
Make GODavaScalarVal compatible with go_data_has_value().
ChangeLog | 5 +++++
goffice/data/go-data-simple.c | 3 +++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 65450d6..c35ef94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-13 Jean Brefort <jean brefort normalesup org>
+
+ * goffice/data/go-data-simple.c (go_data_scalar_val_new): ensure that
+ go_data_has_value() returns TRUE if there is a valid number.
+
2015-04-12 Jean Brefort <jean brefort normalesup org>
* goffice/graph/gog-axis.c (cb_enable_dim): make manual scale really manual
diff --git a/goffice/data/go-data-simple.c b/goffice/data/go-data-simple.c
index aef5b26..8fc7276 100644
--- a/goffice/data/go-data-simple.c
+++ b/goffice/data/go-data-simple.c
@@ -153,6 +153,9 @@ go_data_scalar_val_new (double val)
{
GODataScalarVal *res = g_object_new (GO_TYPE_DATA_SCALAR_VAL, NULL);
res->val = val;
+ if (go_finite (val))
+ GO_DATA (res)->flags = GO_DATA_CACHE_IS_VALID | GO_DATA_HAS_VALUE;
+
return GO_DATA (res);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]