[goffice] Reimplement major grids for discrete axes. [#775624]



commit 923b12f239e5a525dacb23b3876336f6c19de159
Author: Jean Brefort <jean brefort normalesup org>
Date:   Mon Dec 5 12:53:13 2016 +0100

    Reimplement major grids for discrete axes. [#775624]

 ChangeLog                     |    5 +++++
 NEWS                          |    1 +
 goffice/graph/gog-axis-line.c |    8 ++++----
 3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2476fe6..e25571b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-12-05  Jean Brefort  <jean brefort normalesup org>
+
+       * goffice/graph/gog-axis-line.c (role_grid_line_major_can_add):
+       reimplement major grids for discrete axes. [#775624].
+
 2016-11-16  Jean Brefort  <jean brefort normalesup org>
 
        * goffice/utils/go-libxml-extras.c: fix long double support condition.
diff --git a/NEWS b/NEWS
index 4a952a1..1908693 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Jean:
        * Make box plots look like bar plots in legends. [#773825]
        * Fix conditional compilation for long double. Patch from Ludovic
        Rousseau). [#774439]
+       * Reimplement major grids for discrete axes. [#775624].
 
 Morten:
        * Introspection fixes.
diff --git a/goffice/graph/gog-axis-line.c b/goffice/graph/gog-axis-line.c
index 58b0f2b..fdfd919 100644
--- a/goffice/graph/gog-axis-line.c
+++ b/goffice/graph/gog-axis-line.c
@@ -707,10 +707,10 @@ role_grid_line_major_can_add (GogObject const *parent)
        GogAxis *axis = axis_base->axis;
        GogAxisType type = gog_axis_get_atype (axis);
 
-       return (!gog_axis_is_discrete (axis) &&
-               (type == GOG_AXIS_X || type == GOG_AXIS_Y || type == GOG_AXIS_Z ||
-                type == GOG_AXIS_RADIAL || type == GOG_AXIS_CIRCULAR) &&
-                gog_axis_base_get_grid_line (axis_base, TRUE) == NULL);
+       return ((type == GOG_AXIS_X || type == GOG_AXIS_Y || type == GOG_AXIS_Z
+                || type == GOG_AXIS_RADIAL ||
+                (type == GOG_AXIS_CIRCULAR && !gog_axis_is_discrete (axis))) &&
+               gog_axis_base_get_grid_line (axis_base, TRUE) == NULL);
 }
 
 static gboolean


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