somehow autocomplete broke and I didnt notice till now, right after a

release :(
This commit is contained in:
Dustin Carlino 2020-07-26 20:49:16 -07:00
parent a1e1e51b10
commit 24740e9852
11 changed files with 20 additions and 13 deletions

View File

@ -95,7 +95,14 @@ impl<T: 'static + Clone> WidgetImpl for Autocomplete<T> {
self.recalc_menu(ctx);
output.redo_layout = true;
} else {
self.menu.event(ctx, output);
// Don't let the menu fill out the real outcome.
self.menu.event(
ctx,
&mut WidgetOutput {
redo_layout: false,
outcome: None,
},
);
match self.menu.state {
InputResult::StillActive => {}
// Ignore this and make sure the Composite has a quit control

View File

@ -140,7 +140,7 @@ impl WidgetImpl for CompareTimes {
self.top_left = top_left;
}
fn event(&mut self, _ctx: &mut EventCtx, _output: &mut WidgetOutput) {}
fn event(&mut self, _: &mut EventCtx, _: &mut WidgetOutput) {}
fn draw(&self, g: &mut GfxCtx) {
g.redraw_at(self.top_left, &self.draw);

View File

@ -11,7 +11,7 @@ impl WidgetImpl for Nothing {
unreachable!()
}
fn event(&mut self, _ctx: &mut EventCtx, _output: &mut WidgetOutput) {
fn event(&mut self, _: &mut EventCtx, _: &mut WidgetOutput) {
unreachable!()
}
fn draw(&self, _g: &mut GfxCtx) {

View File

@ -187,7 +187,7 @@ impl WidgetImpl for FanChart {
self.top_left = top_left;
}
fn event(&mut self, _ctx: &mut EventCtx, _output: &mut WidgetOutput) {}
fn event(&mut self, _: &mut EventCtx, _: &mut WidgetOutput) {}
fn draw(&self, g: &mut GfxCtx) {
g.redraw_at(self.top_left, &self.draw);

View File

@ -25,6 +25,6 @@ impl WidgetImpl for Filler {
self.top_left = top_left;
}
fn event(&mut self, _ctx: &mut EventCtx, _output: &mut WidgetOutput) {}
fn event(&mut self, _: &mut EventCtx, _: &mut WidgetOutput) {}
fn draw(&self, _g: &mut GfxCtx) {}
}

View File

@ -59,7 +59,7 @@ impl WidgetImpl for JustDraw {
self.top_left = top_left;
}
fn event(&mut self, _ctx: &mut EventCtx, _output: &mut WidgetOutput) {}
fn event(&mut self, _: &mut EventCtx, _: &mut WidgetOutput) {}
fn draw(&self, g: &mut GfxCtx) {
g.redraw_at(self.top_left, &self.draw);
@ -94,7 +94,7 @@ impl WidgetImpl for DrawWithTooltips {
self.top_left = top_left;
}
fn event(&mut self, _ctx: &mut EventCtx, _output: &mut WidgetOutput) {}
fn event(&mut self, _: &mut EventCtx, _: &mut WidgetOutput) {}
fn draw(&self, g: &mut GfxCtx) {
g.redraw_at(self.top_left, &self.draw);

View File

@ -206,7 +206,7 @@ impl<T: Yvalue<T>> WidgetImpl for LinePlot<T> {
self.top_left = top_left;
}
fn event(&mut self, _ctx: &mut EventCtx, _output: &mut WidgetOutput) {}
fn event(&mut self, _: &mut EventCtx, _: &mut WidgetOutput) {}
fn draw(&self, g: &mut GfxCtx) {
g.redraw_at(self.top_left, &self.draw);

View File

@ -37,7 +37,7 @@ pub trait WidgetImpl: downcast_rs::Downcast {
}
/// Restore state from the previous version of this widget, with the same ID. Implementors must
/// downcast.
fn restore(&mut self, _ctx: &mut EventCtx, _prev: &Box<dyn WidgetImpl>) {
fn restore(&mut self, _: &mut EventCtx, _prev: &Box<dyn WidgetImpl>) {
unreachable!()
}
}

View File

@ -186,7 +186,7 @@ impl WidgetImpl for ScatterPlot {
self.top_left = top_left;
}
fn event(&mut self, _ctx: &mut EventCtx, _output: &mut WidgetOutput) {}
fn event(&mut self, _: &mut EventCtx, _: &mut WidgetOutput) {}
fn draw(&self, g: &mut GfxCtx) {
g.redraw_at(self.top_left, &self.draw);

View File

@ -204,7 +204,7 @@ impl WidgetImpl for Slider {
self.top_left = top_left;
}
fn event(&mut self, ctx: &mut EventCtx, _output: &mut WidgetOutput) {
fn event(&mut self, ctx: &mut EventCtx, _: &mut WidgetOutput) {
if self.inner_event(ctx) {
self.recalc(ctx);
}
@ -371,7 +371,7 @@ impl WidgetImpl for AreaSlider {
self.top_left = top_left;
}
fn event(&mut self, ctx: &mut EventCtx, _output: &mut WidgetOutput) {
fn event(&mut self, ctx: &mut EventCtx, _: &mut WidgetOutput) {
if self.inner_event(ctx) {
self.recalc(ctx);
}

View File

@ -63,7 +63,7 @@ impl WidgetImpl for TextBox {
self.top_left = top_left;
}
fn event(&mut self, ctx: &mut EventCtx, _output: &mut WidgetOutput) {
fn event(&mut self, ctx: &mut EventCtx, _: &mut WidgetOutput) {
if ctx.redo_mouseover() {
if let Some(pt) = ctx.canvas.get_cursor_in_screen_space() {
self.hovering = ScreenRectangle::top_left(self.top_left, self.dims).contains(pt);