aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorValerio Mariani <valerio.mariani@desy.de>2014-03-03 13:49:23 +0100
committerThomas White <taw@physics.org>2014-04-25 16:58:49 +0200
commitfb941e1a8e0cbcce94d0534173122ab324777acc (patch)
tree2a1bd79691c9ed941a459b7b1c98b2ebe0a292c1 /src
parentd9df3e76cca7be254dc2654cd844343b2e748462 (diff)
Fixed bug with accessing rigid group and panel information even if the geometry was not loaded
Diffstat (limited to 'src')
-rw-r--r--src/dw-hdfsee.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c
index d30de55f..93de9041 100644
--- a/src/dw-hdfsee.c
+++ b/src/dw-hdfsee.c
@@ -1173,11 +1173,17 @@ static gint displaywindow_set_calibmode(GtkWidget *d, DisplayWindow *dw)
gtk_check_menu_item_set_state(GTK_CHECK_MENU_ITEM(w),0);
+ dw->calib_mode_curr_rg = dw->image->det->rigid_groups[0];
+ dw->calib_mode_curr_p = dw->calib_mode_curr_rg->panels[0];
+
} else {
/* Get new value */
dw->calib_mode = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w));
-
+ if ( dw->calib_mode_curr_rg == NULL && dw->calib_mode_curr_p == NULL) {
+ dw->calib_mode_curr_rg = dw->image->det->rigid_groups[0];
+ dw->calib_mode_curr_p = dw->calib_mode_curr_rg->panels[0];
+ }
displaywindow_update(dw);
}
@@ -2228,10 +2234,10 @@ DisplayWindow *displaywindow_open(const char *filename, const char *peaks,
if (dw->calib_mode == 1) {
ww = gtk_ui_manager_get_widget(dw->ui, "/ui/displaywindow/tools/calibmode");
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(ww), TRUE);
+ dw->calib_mode_curr_rg = dw->image->det->rigid_groups[0];
+ dw->calib_mode_curr_p = dw->calib_mode_curr_rg->panels[0];
}
- dw->calib_mode_curr_rg = dw->image->det->rigid_groups[0];
- dw->calib_mode_curr_p = dw->calib_mode_curr_rg->panels[0];
displaywindow_update(dw);