flatten mouseover_something impl
@@ -155,28 +155,6 @@ impl UI {
debug_areas: bool,
) -> Option<ID> {
if !ctx.canvas.is_dragging() && ctx.input.get_moved_mouse().is_some() {
- return self.mouseover_something(
- &ctx,
- show_turn_icons_for,
- source,
- show_objs,
- debug_areas,
- );
- }
- if ctx.input.window_lost_cursor() {
- return None;
- }
- self.primary.current_selection
- }
-
- fn mouseover_something(
- &self,
- ctx: &EventCtx,
- show_turn_icons_for: Option<IntersectionID>,
- source: &GetDrawAgents,
- show_objs: &ShowObject,
- debug_areas: bool,
- ) -> Option<ID> {
// Unzoomed mode. Ignore when debugging areas.
if ctx.canvas.cam_zoom < MIN_ZOOM_FOR_DETAIL && !debug_areas {
return None;
@@ -210,7 +188,12 @@ impl UI {
}
};
}
- None
+ return None;
+ }
+ if ctx.input.window_lost_cursor() {
+ return None;
+ }
+ self.primary.current_selection
}
// TODO This could probably belong to DrawMap again, but it's annoying to plumb things that
