From 817ce63505c93f00117439eee6b11934f6cd4b1d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 26 Apr 2012 14:11:16 +0200 Subject: Tidy up a bit in src/dw-hdfsee.c --- src/dw-hdfsee.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/dw-hdfsee.c') diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c index 3881d162..de03c62b 100644 --- a/src/dw-hdfsee.c +++ b/src/dw-hdfsee.c @@ -1340,7 +1340,6 @@ static void numbers_update(DisplayWindow *dw) for ( py=0; py<17; py++ ) { char s[32]; - float val; GtkWidget *l; int x, y; int invalid; @@ -1355,11 +1354,13 @@ static void numbers_update(DisplayWindow *dw) /* Map from unbinned mapped pixel coordinates to a panel */ invalid = reverse_2d_mapping(x, y, &dfs, &dss, dw->image->det); fs = dfs; ss = dss; + if ( !invalid ) { + + float val; + val = dw->image->data[fs+ss*dw->image->width]; - } - if ( !invalid ) { if ( val > 0.0 ) { if ( log(val)/log(10.0) < 5 ) { snprintf(s, 31, "%.0f", val); @@ -1373,6 +1374,7 @@ static void numbers_update(DisplayWindow *dw) snprintf(s, 31, "-HUGE"); } } + } else { strcpy(s, "-"); } -- cgit v1.2.3