aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2008-01-17 12:13:12 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2008-01-17 12:13:12 +0000
commit5c82ba45aa904ebe36f0a5e1abf98c49b9649abd (patch)
tree632a932410c8ce4e0fb6785004c4fa402392bf8a
parent762a08d3ddba51df373f443e9499c5b850d9f50c (diff)
Don't crash when there isn't an image stack to display
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@255 bf6ca9ba-c028-0410-8290-897cf20841d1
-rw-r--r--src/control.h1
-rw-r--r--src/glbits.c2
-rw-r--r--src/main.c4
3 files changed, 1 insertions, 6 deletions
diff --git a/src/control.h b/src/control.h
index e5bde09..2893d5c 100644
--- a/src/control.h
+++ b/src/control.h
@@ -24,7 +24,6 @@ typedef enum ift_enum {
INPUT_NONE,
INPUT_QDRP,
INPUT_MRC,
- INPUT_CACHE,
INPUT_DRX
} InputFileType;
diff --git a/src/glbits.c b/src/glbits.c
index b05f430..bf523fa 100644
--- a/src/glbits.c
+++ b/src/glbits.c
@@ -582,7 +582,7 @@ void glbits_prepare(DisplayWindow *dw) {
}
/* Tilt axis */
- if ( ctx->images ) {
+ if ( ctx->images->n_images > 0 ) {
glPushMatrix();
/* Images rotate clockwise by omega to put tilt axis at +x,
* so rotate tilt axis anticlockwise by omega.
diff --git a/src/main.c b/src/main.c
index 1642b47..b83e209 100644
--- a/src/main.c
+++ b/src/main.c
@@ -229,10 +229,6 @@ void main_method_dialog_open(ControlContext *ctx) {
ctx->checkbox_sumstack = gtk_check_button_new_with_label("Show summed image stack");
gtk_table_attach_defaults(GTK_TABLE(table), ctx->checkbox_sumstack, 1, 3, 5, 6);
- if ( ctx->inputfiletype == INPUT_CACHE ) {
- gtk_widget_set_sensitive(GTK_WIDGET(ctx->combo_peaksearch), FALSE);
- gtk_combo_box_set_active(GTK_COMBO_BOX(ctx->combo_peaksearch), 5);
- }
if ( ctx->inputfiletype == INPUT_DRX ) {
gtk_combo_box_append_text(GTK_COMBO_BOX(ctx->combo_peaksearch), "3D coordinates from DirAx file");
gtk_widget_set_sensitive(GTK_WIDGET(ctx->combo_peaksearch), FALSE);