aboutsummaryrefslogtreecommitdiff
path: root/src/crystfelindexingopts.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-08-20 15:07:41 +0200
committerThomas White <taw@physics.org>2020-08-20 15:07:41 +0200
commite7a8a2a281c58760bc9c5605f7513520941c75a5 (patch)
tree78cb7979b17923cd9fe69ac70d32d9041223d2da /src/crystfelindexingopts.c
parent82c5f584e50c49cc432619eb1924d4841d0a78eb (diff)
Disable cell tolerances when "check cell" is unchecked
Diffstat (limited to 'src/crystfelindexingopts.c')
-rw-r--r--src/crystfelindexingopts.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/crystfelindexingopts.c b/src/crystfelindexingopts.c
index af7857f5..c2fde290 100644
--- a/src/crystfelindexingopts.c
+++ b/src/crystfelindexingopts.c
@@ -241,6 +241,18 @@ static void auto_indm_toggle_sig(GtkToggleButton *togglebutton,
}
+static void check_cell_toggle_sig(GtkToggleButton *togglebutton,
+ CrystFELIndexingOpts *io)
+{
+ int i;
+ int active = gtk_toggle_button_get_active(togglebutton);
+ for ( i=0; i<6; i++ ) {
+ gtk_widget_set_sensitive(GTK_WIDGET(io->tols[i]),
+ active);
+ }
+}
+
+
static GtkWidget *indexing_parameters(CrystFELIndexingOpts *io)
{
GtkWidget *box;
@@ -320,6 +332,8 @@ static GtkWidget *indexing_parameters(CrystFELIndexingOpts *io)
FALSE, FALSE, 0);
tolerances = make_tolerances(io);
gtk_container_add(GTK_CONTAINER(expander), tolerances);
+ g_signal_connect(G_OBJECT(io->check_cell), "toggled",
+ G_CALLBACK(check_cell_toggle_sig), io);
/* --min-peaks (NB add one) */
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);