On Sun, Nov 06, 2011 at 08:38:30PM +0100, Lennart Fricke wrote:
> same problem here. The scale is not updated after level. It does not
> change to [16.909,16.975] but stays [16.88,17.02]. I think, it has to
> do with the color axis in the data view that is not updated. At least
> the values returned by gwy_color_axis_get_range are the ones of the data
> before leveling. Adding serveral gtk.main_iteration_do(False) calls can
> be used as a workaround.
I see. Does the attached patch fix it for you?
Yeti
Index: modules/file/pixmap.c
===================================================================
--- modules/file/pixmap.c (revision 13007)
+++ modules/file/pixmap.c (working copy)
@@ -2249,9 +2249,7 @@
pixmap_draw_presentational(GwyContainer *data,
PixmapSaveArgs *args)
{
- GtkWidget *data_window;
GwyPixmapLayer *layer;
- GtkWidget *coloraxis;
GdkPixbuf *pixbuf, *datapixbuf, *tmpixbuf;
GdkPixbuf *hrpixbuf = NULL, *vrpixbuf = NULL, *scalepixbuf = NULL;
GwySIUnit *siunit_xy, *siunit_z;
@@ -2286,7 +2284,6 @@
return pixbuf;
}
- data_window = gtk_widget_get_toplevel(GTK_WIDGET(args->data_view));
g_return_val_if_fail(gwy_data_view_get_data(args->data_view) == data, NULL);
layer = gwy_data_view_get_base_layer(args->data_view);
g_return_val_if_fail(GWY_IS_LAYER_BASIC(layer), NULL);
@@ -2372,9 +2369,7 @@
siunit_z = gwy_si_unit_new(NULL);
else
siunit_z = gwy_data_field_get_si_unit_z(args->dfield);
- coloraxis
- = gwy_data_window_get_color_axis(GWY_DATA_WINDOW(data_window));
- gwy_color_axis_get_range(GWY_COLOR_AXIS(coloraxis), &min, &max);
+ gwy_layer_basic_get_range(GWY_LAYER_BASIC(layer), &min, &max);
scalepixbuf = fmscale(zheight + 2*lw, min, max, fontzoom, siunit_z);
inverted = min > max;
scw = gdk_pixbuf_get_width(scalepixbuf);
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users