[goffice] Removed span tab 3D axes that don't support it. [#685405]



commit 90822843fd45c459f16d37638491b6ae8b6dc559
Author: Jean Brefort <jean brefort normalesup org>
Date:   Thu Oct 4 20:00:41 2012 +0200

    Removed span tab 3D axes that don't support it. [#685405]

 ChangeLog                |    5 +++++
 goffice/graph/gog-axis.c |    4 +++-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7d83e16..a789afe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-10-04  Jean Brefort  <jean brefort normalesup org>
 
+	* goffice/graph/gog-axis.c (gog_axis_populate_editor): don't show the
+	span tab for axes which don't support it. [#685405]
+
+2012-10-04  Jean Brefort  <jean brefort normalesup org>
+
 	* goffice/graph/gog-axis-line.c (axis_line_render): fixed axis handles
 	positions. [#684886]
 
diff --git a/goffice/graph/gog-axis.c b/goffice/graph/gog-axis.c
index 42e8d7c..9eca247 100644
--- a/goffice/graph/gog-axis.c
+++ b/goffice/graph/gog-axis.c
@@ -2766,7 +2766,9 @@ gog_axis_populate_editor (GogObject *gobj,
 			     _("Scale"));
 
 	/* effective area */
-	if (axis->type != GOG_AXIS_CIRCULAR) {
+	/* we actually only support with some axes (X, Y, and radial) in 2D charts */
+	if ((axis->type == GOG_AXIS_X || axis->type == GOG_AXIS_Y || axis->type == GOG_AXIS_RADIAL) &&
+	    (GOG_IS_CHART (gog_object_get_parent (gobj))? !gog_chart_is_3d (GOG_CHART (gog_object_get_parent (gobj))): TRUE)) {
 		GtkAdjustment *adj;
 		double start = axis->span_start * 100., end = axis->span_end * 100.;
 		w = go_gtk_builder_get_widget (gui, "start-btn");



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