aboutsummaryrefslogtreecommitdiff
path: root/src/gui_ambi.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-02-18 09:36:13 +0100
committerThomas White <taw@physics.org>2021-02-18 09:36:13 +0100
commitf1f1d45b612a1b99acaea20a99ff2bcebee8df3f (patch)
treeccf6ddd7c972d2c175354161b37537c61bca3f86 /src/gui_ambi.c
parente0437375017e504124cab53e5d19f4da499e88e7 (diff)
GUI: Track separately whether ambiguity operation should be used
This allows values to be held for both, which is more helpful.
Diffstat (limited to 'src/gui_ambi.c')
-rw-r--r--src/gui_ambi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui_ambi.c b/src/gui_ambi.c
index 8ab0acc3..8d315b00 100644
--- a/src/gui_ambi.c
+++ b/src/gui_ambi.c
@@ -134,6 +134,7 @@ static void ambi_response_sig(GtkWidget *dialog, gint resp,
win->proj->ambi_params.sym = get_sym(win->sym);
win->proj->ambi_params.source_sym = get_sym(win->source_sym);
win->proj->ambi_params.operator = get_str(win->operator);
+ win->proj->ambi_params.use_operator = get_bool(win->use_operator);
backend_idx = gtk_combo_box_get_active(GTK_COMBO_BOX(win->backend_combo));
if ( backend_idx < 0 ) return;
@@ -223,12 +224,12 @@ static GtkWidget *make_ambigator_options(struct ambi_window *win)
g_signal_connect(G_OBJECT(win->use_operator), "toggled",
G_CALLBACK(i_maybe_disable), win->operator);
- if ( proj->ambi_params.source_sym != NULL ) {
- gtk_widget_set_sensitive(win->operator, FALSE);
- set_active(win->use_source_sym, TRUE);
- } else {
+ if ( proj->ambi_params.use_operator ) {
gtk_widget_set_sensitive(win->source_sym, FALSE);
set_active(win->use_operator, TRUE);
+ } else {
+ gtk_widget_set_sensitive(win->operator, FALSE);
+ set_active(win->use_source_sym, TRUE);
}
hbox = gtk_hbox_new(FALSE, 0.0);