New Guide: a measuring run does not decide OK; trial types without Tab

This commit is contained in:
aiongg
2026-11-16 23:39:32 +00:00
parent c962f10027
commit b9904a023a
2 changed files with 6 additions and 5 deletions
@@ -190,7 +190,10 @@ impl<'a> NewGuideDialog<'a> {
parsed = position_row(ui, &words, &number_units, &units, values, first);
color_row(ui, &words, &mut values.color, NEW_GUIDE_COLOR_KEY, form.requests());
});
ok_enabled = parsed;
// A measuring run lays the field out without its typing run, so it never says whether the text parses.
if !crate::runtime::measure::active(ui.ctx()) {
ok_enabled = parsed;
}
parsed
});
let result = shown.accepted.map(|values| {
@@ -151,8 +151,7 @@ fn position_text_that_does_not_parse_keeps_ok_from_making_a_guide() {
let position = fixture.by_label("Position").expect("the Position field");
fixture.click(&position).settle();
fixture.key(egui::Key::A, egui::Modifiers::COMMAND);
fixture.type_text("far");
fixture.key(egui::Key::Tab, egui::Modifiers::NONE).settle();
fixture.type_text("far").settle();
assert!(!enabled.get(), "OK is disabled while the text does not parse");
let ok = fixture.by_label("OK").expect("the footer has OK");
fixture.click(&ok).settle();
@@ -162,8 +161,7 @@ fn position_text_that_does_not_parse_keeps_ok_from_making_a_guide() {
let position = fixture.by_label("Position").expect("the Position field");
fixture.click(&position).settle();
fixture.key(egui::Key::A, egui::Modifiers::COMMAND);
fixture.type_text("40");
fixture.key(egui::Key::Tab, egui::Modifiers::NONE).settle();
fixture.type_text("40").settle();
assert!(enabled.get(), "a number enables OK again");
let ok = fixture.by_label("OK").expect("the footer has OK");
fixture.click(&ok).settle();