[goffice] Fixed drop lines in line plots. [#638738]



commit 01526cd04c92ceb34eb309f4f8566cf67ad5f366
Author: Jean Brefort <jean brefort normalesup org>
Date:   Thu Jan 6 11:26:16 2011 +0100

    Fixed drop lines in line plots. [#638738]

 ChangeLog                      |    5 +++++
 NEWS                           |    1 +
 plugins/plot_barcol/gog-line.c |    4 ++--
 3 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 58315c1..4e9ba95 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-06  Jean Brefort  <jean brefort normalesup org>
+
+	* plugins/plot_barcol/gog-line.c (gog_line_view_render):fixed drop lines
+	in line plots. [#638738]
+
 2010-12-17  Jean Brefort  <jean brefort normalesup org>
 
 	* goffice/graph/gog-axis-line.c (xyz_process): fixed a memory leak.
diff --git a/NEWS b/NEWS
index 190ced0..83611de 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Andreas
 
 Jean:
 	* Fixed memory leaks found by cppcheck analysis.
+	* Fixed drop lines in line plots. [#638738]
 
 --------------------------------------------------------------------------
 goffice 0.8.12:
diff --git a/plugins/plot_barcol/gog-line.c b/plugins/plot_barcol/gog-line.c
index 7803147..06e1595 100644
--- a/plugins/plot_barcol/gog-line.c
+++ b/plugins/plot_barcol/gog-line.c
@@ -692,9 +692,9 @@ gog_line_view_render (GogView *view, GogViewAllocation const *bbox)
 				points[i][j].x = x;
 				points[i][j].y = y;
 			}
-			if (lines[i]) {
+			if (lines[i] && go_finite (y)) {
 				double y_target;
-				GogAxis *axis = GOG_PLOT (model)->axis[GOG_AXIS_X];
+				GogAxis *axis = GOG_PLOT (model)->axis[GOG_AXIS_Y];
 				GogAxisPosition pos = gog_axis_base_get_clamped_position (GOG_AXIS_BASE (axis));
 				switch (pos) {
 				case GOG_AXIS_AT_LOW:



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