mirror of
https://github.com/storytold/wordcraft.git
synced 2026-12-04 22:49:54 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8199f45fa2 | ||
|
|
6e2b519b3e |
@@ -269,12 +269,21 @@ impl WordForm for MergeRecordsForm {
|
||||
})
|
||||
});
|
||||
self.choice = choice;
|
||||
// Typing a number picks the range.
|
||||
if let Some(v) = NumberField::new(tl!("From:"), Bind::given(self.from)).show(ui).value().copied() {
|
||||
// Typing a number picks the range. One row, "[from] To: [to]": the From: radio captions the first box, the
|
||||
// second needs its own (#7976).
|
||||
let (from, to) = (self.from, self.to);
|
||||
let (from, to) = ui
|
||||
.horizontal(|ui| {
|
||||
let from = NumberField::new(tl!("From:"), Bind::given(from)).show(ui).value().copied();
|
||||
let to = labelled(ui, tl!("To:"), |name, ui| NumberField::new(name, Bind::given(to)).show(ui).value().copied()).flatten();
|
||||
(from, to)
|
||||
})
|
||||
.inner;
|
||||
if let Some(v) = from {
|
||||
self.from = v;
|
||||
self.choice = 2;
|
||||
}
|
||||
if let Some(v) = NumberField::new(tl!("To:"), Bind::given(self.to)).show(ui).value().copied() {
|
||||
if let Some(v) = to {
|
||||
self.to = v;
|
||||
self.choice = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user