invalidate the map display each time we repaint it

really we should only need to do this when the app-state changes
This commit is contained in:
Daniel Barlow 2025-05-29 21:03:02 +01:00
parent 6e61113366
commit cb0314d1d6

View File

@ -76,6 +76,7 @@ label.readout {
;; to fill the width of the screen plus a bit
(fn cairo-the-map [self g]
(: (self:get_window) :invalidate_rect nil)
(let [{ : lat : lon : zoom } app-state
num-tiles-x (+ 0 (math.ceil (/ map-width tile-size)))
num-tiles-y (+ 0 (math.ceil (/ map-height tile-size)))
@ -116,7 +117,7 @@ label.readout {
(fn osm-widget []
(Gtk.Label {
(Gtk.DrawingArea {
:width map-width :height map-height
:on_draw cairo-the-map
}))