Draw geo overlay for an unresolved-but-selected target too
Previously _draw_geo_overlays() only ever looked at placed_entities()/ambiguous_entities(), so a target that failed to resolve entirely (no coord, no potential_coords, e.g. two clues that don't quite geometrically agree) never got its bearing/distance lines drawn no matter what, there was no way to see why on the map itself. Selection is now also a trigger alongside hover/show_geo_desc (matching how firing arrows and blast radius already key off selection), and the candidate list comes from board.reference_points + board.targets directly rather than the resolved-only views, so an unresolved selection still shows its clue geometry. Lets you eyeball whether a bad reading is plain wrong or just off by a bit, bearing readings apparently carry some real-world error margin.
This commit is contained in:
parent
9295b9bbab
commit
a522963855
@ -528,13 +528,20 @@ class GridCanvas(Gtk.DrawingArea):
|
|||||||
cr.stroke()
|
cr.stroke()
|
||||||
|
|
||||||
def _draw_geo_overlays(self, cr, cell_w, cell_h, grid_h) -> None:
|
def _draw_geo_overlays(self, cr, cell_w, cell_h, grid_h) -> None:
|
||||||
to_show = []
|
"""Bearing/distance overlay lines for whatever's hovered, pinned
|
||||||
for category, obj in self.board.placed_entities():
|
via show_geo_desc, or currently selected. Selection matters even
|
||||||
if obj is self.hovered or obj.show_geo_desc:
|
for a target that never resolved at all (no coord, no
|
||||||
to_show.append(obj)
|
potential_coords, e.g. two clues that don't quite geometrically
|
||||||
for category, obj in self.board.ambiguous_entities():
|
agree), it's not in placed_entities()/ambiguous_entities() either
|
||||||
if obj is self.hovered or obj.show_geo_desc:
|
way, so this looks at every RP/Target directly rather than those,
|
||||||
to_show.append(obj)
|
the only way to let the user eyeball a bad-but-close reading
|
||||||
|
against what it should have crossed."""
|
||||||
|
candidates = list(self.board.reference_points) + list(self.board.targets)
|
||||||
|
to_show = [
|
||||||
|
obj for obj in candidates
|
||||||
|
if obj.location.clues and not self._excluded_from_map(obj)
|
||||||
|
and (obj is self.hovered or obj.show_geo_desc or obj is self.selected)
|
||||||
|
]
|
||||||
|
|
||||||
for obj in to_show:
|
for obj in to_show:
|
||||||
for clue in obj.location.clues:
|
for clue in obj.location.clues:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user