[goffice] Update x and y limits when data change for xyz plots. [#627288]



commit 9d41ac7a37eb520074d1f66cedb09a06c02a5837
Author: Jean Brefort <jean brefort normalesup org>
Date:   Thu Aug 19 20:17:52 2010 +0200

    Update x and y limits when data change for xyz plots. [#627288]

 ChangeLog                              |    6 ++++++
 NEWS                                   |    1 +
 plugins/plot_surface/gog-xyz-surface.c |    8 ++++++++
 3 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ecceb64..19c2e6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-08-19  Jean Brefort  <jean brefort normalesup org>
+
+	* plugins/plot_surface/gog-xyz-surface.c
+	(gog_xyz_surface_plot_update): force update of x and y limits when data
+	change. [#627388]
+
 2010-08-18  Jean Brefort  <jean brefort normalesup org>
 
 	* goffice/utils/go-style.c (go_style_fill_sax_save): fixed typo.
diff --git a/NEWS b/NEWS
index f62e851..2a3ac65 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ goffice 0.8.10:
 
 Jean:
 	* Always use real line width when evaluating dashes. [#442546]
+	* Update x and y limits when data change for xyz plots. [#627288]
 
 Morten:
 	* Limit formats to sane number of decimals.  [#627066]
diff --git a/plugins/plot_surface/gog-xyz-surface.c b/plugins/plot_surface/gog-xyz-surface.c
index 06fd957..4975cbb 100644
--- a/plugins/plot_surface/gog-xyz-surface.c
+++ b/plugins/plot_surface/gog-xyz-surface.c
@@ -212,6 +212,10 @@ gog_xyz_surface_plot_update (GogObject *obj)
 	model->x.minima = tmp_min;
 	model->x.maxima = tmp_max;
 	gog_axis_bound_changed (model->base.axis[GOG_AXIS_X], GOG_OBJECT (model));
+	if (model->x_vals != NULL) {
+		g_object_unref (model->x_vals);
+		model->x_vals = NULL;
+	}
 
 	go_data_get_bounds (series->base.values[1].data, &tmp_min, &tmp_max);
 	if (!go_finite (tmp_min) || !go_finite (tmp_max) ||
@@ -224,6 +228,10 @@ gog_xyz_surface_plot_update (GogObject *obj)
 	model->y.minima = tmp_min;
 	model->y.maxima = tmp_max;
 	gog_axis_bound_changed (model->base.axis[GOG_AXIS_Y], GOG_OBJECT (model));
+	if (model->y_vals != NULL) {
+		g_object_unref (model->y_vals);
+		model->y_vals = NULL;
+	}
 
 	go_data_get_bounds (series->base.values[2].data, &tmp_min, &tmp_max);
 	if (!go_finite (tmp_min) || !go_finite (tmp_max) ||



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