[goffice] fixed axis line children allocation, see #760675, comments 5-7



commit b02cb9b0dc76d4b32d40f309a78befd0925ef8f8
Author: Jean Brefort <jean brefort normalesup org>
Date:   Fri Jan 29 14:59:43 2016 +0100

    fixed axis line children allocation, see #760675, comments 5-7

 ChangeLog                |    5 +++++
 goffice/graph/gog-axis.c |    6 +++++-
 2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b191b92..179e0fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-29  Jean Brefort  <jean brefort normalesup org>
+
+       * goffice/graph/gog-axis.c (gog_axis_view_size_allocate): fixed axis
+       line children allocation, see #760675, comments 5-7.
+
 2016-01-28  Jean Brefort  <jean brefort normalesup org>
 
        * goffice/graph/gog-axis-line.c: add title to axis lines. [#760675]
diff --git a/goffice/graph/gog-axis.c b/goffice/graph/gog-axis.c
index a41be86..38673cf 100644
--- a/goffice/graph/gog-axis.c
+++ b/goffice/graph/gog-axis.c
@@ -4347,7 +4347,11 @@ gog_axis_view_size_allocate (GogView *view, GogViewAllocation const *bbox)
                                } else {
                                        gog_view_size_allocate (child, plot_area);
                                }
-                       }
+                       } else if (GOG_IS_AXIS_LINE (child->model))
+                               child->allocation_valid = TRUE; /* KLUDGE, but needed for axis lines
+                                       otherwise adding a title does not invalidate the chart allocation,
+                                       see #760675, comments 5+ */
+
                }
                if (GOG_IS_AXIS_LINE (child->model) && saved_ptr == NULL && child->children != NULL) {
                        axis_pos = gog_axis_base_get_clamped_position (GOG_AXIS_BASE (child->model));


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