diff options
author | Thomas White <taw@physics.org> | 2012-04-26 14:11:16 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-04-26 14:11:16 +0200 |
commit | 817ce63505c93f00117439eee6b11934f6cd4b1d (patch) | |
tree | e15c81bc1627e807dc5c88cb91e899e133ea397c /src | |
parent | d6c040ed981827f072e3e22501620a65a4418acd (diff) |
Tidy up a bit in src/dw-hdfsee.c
Diffstat (limited to 'src')
-rw-r--r-- | src/dw-hdfsee.c | 8 |
1 files changed, 5 insertions, 3 deletions
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, "-"); } |