summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/planner.c b/planner.c
index 683fbef42..0066bbcec 100644
--- a/planner.c
+++ b/planner.c
@@ -563,6 +563,14 @@ static void gas_changed_cb(GtkWidget *combo, gpointer data)
int idx = data - NULL;
gastext = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo));
+ /* stupidly this gets called for two reasons:
+ * a) any keystroke into the entry field
+ * b) mouse selection of a dropdown
+ * we only care about b) (a) is handled much better with the focus-out event)
+ * so let's check that the text returned is actually in our model before going on
+ */
+ if (match_list(gas_model, gastext) != MATCH_EXACT)
+ return;
o2 = he = 0;
if (!validate_gas(gastext, &o2, &he)) {
/* this should never happen as only validated texts should be