[gnumeric] A better fix for #565.



commit 8e2a4c2798a061fc0e7b6ec0cf1f179ad0e08bf6
Author: Jean Brefort <jean brefort normalesup org>
Date:   Mon Feb 22 08:50:23 2021 +0100

    A better fix for #565.

 ChangeLog                | 7 +++++++
 src/sheet-object-graph.c | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 53c7ff1c0..ce61ae937 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-02-22  Jean Brefort  <jean brefort normalesup org>
+
+       reviewed by: <delete if not using a buddy>
+
+       * src/sheet-object-graph.c (sog_update_graph_size),
+       (gnm_sog_bounds_changed):
+
 2021-02-21  Jean Brefort  <jean brefort normalesup org>
 
        * src/sheet-object-graph.c (gnm_sog_bounds_changed): don't take anchors
diff --git a/src/sheet-object-graph.c b/src/sheet-object-graph.c
index bb232dc15..a9e8c5ab0 100644
--- a/src/sheet-object-graph.c
+++ b/src/sheet-object-graph.c
@@ -526,7 +526,8 @@ sog_update_graph_size (SheetObjectGraph *sog)
        double coords[4];
        SheetObject *so = GNM_SO (sog);
 
-       if (sog->graph == NULL || so->sheet == NULL)
+       if (sog->graph == NULL || so->sheet == NULL ||
+           so->sheet->sheet_type != GNM_SHEET_DATA)
                return;
 
        sheet_object_position_pts_get (so, coords);
@@ -570,7 +571,7 @@ gnm_sog_bounds_changed (SheetObject *so)
        SheetObjectGraph *sog = GNM_SO_GRAPH (so);
 
        /* If it has not been realized there is no renderer yet */
-       if (sog->renderer != NULL && so->sheet->sheet_type == GNM_SHEET_DATA)
+       if (sog->renderer != NULL)
                sog_update_graph_size (sog);
 }
 


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