mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-25 11:44:25 +03:00
recalculate mouseover when unhiding stuff in debug mode. can do this now
that we're not borrowing the world.
This commit is contained in:
parent
e67305d084
commit
eac7be2028
@ -89,7 +89,6 @@ impl DebugMode {
|
||||
|
||||
impl State for DebugMode {
|
||||
fn event(&mut self, ctx: &mut EventCtx, ui: &mut UI) -> (Transition, EventLoopMode) {
|
||||
// TODO This might break, because ShowObject is implemented on the entirety of DebugMode
|
||||
if ctx.redo_mouseover() {
|
||||
ui.primary.current_selection =
|
||||
ui.recalculate_current_selection(ctx, &ui.primary.sim, self, true);
|
||||
@ -180,8 +179,8 @@ impl State for DebugMode {
|
||||
None => {
|
||||
if !self.hidden.is_empty() && self.menu.action("unhide everything") {
|
||||
self.hidden.clear();
|
||||
// TODO recalculate_current_selection... need to borrow mode
|
||||
// immutably
|
||||
ui.primary.current_selection =
|
||||
ui.recalculate_current_selection(ctx, &ui.primary.sim, self, true);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
@ -237,8 +236,8 @@ impl State for DebugMode {
|
||||
}
|
||||
|
||||
if changed {
|
||||
// TODO recalculate_current_selection... need to borrow mode
|
||||
// immutably
|
||||
ui.primary.current_selection =
|
||||
ui.recalculate_current_selection(ctx, &ui.primary.sim, self, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user