recalculate mouseover when unhiding stuff in debug mode. can do this now

that we're not borrowing the world.
This commit is contained in:
Dustin Carlino 2019-06-23 09:48:50 -07:00
parent e67305d084
commit eac7be2028

View File

@ -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);
}
}