From 09d67fbad9df92caf2251d36b4abd7979fd27126 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 2 May 2023 17:26:46 -0400 Subject: Map + popups reflect checked locations --- tracker_panel.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tracker_panel.cpp') diff --git a/tracker_panel.cpp b/tracker_panel.cpp index 0e78cc5..1aa7dcf 100644 --- a/tracker_panel.cpp +++ b/tracker_panel.cpp @@ -13,6 +13,7 @@ TrackerPanel::TrackerPanel(wxWindow *parent) : wxPanel(parent, wxID_ANY) { AreaPopup *area_popup = new AreaPopup(this, map_area.id); area_popup->SetPosition({0, 0}); area_popup->Raise(); + area_popups_.push_back(area_popup); AreaWindow *area_window = new AreaWindow(this, map_area.id, area_popup); area_window->Lower(); @@ -24,6 +25,18 @@ TrackerPanel::TrackerPanel(wxWindow *parent) : wxPanel(parent, wxID_ANY) { Bind(wxEVT_PAINT, &TrackerPanel::OnPaint, this); } +void TrackerPanel::UpdateIndicators() { + Redraw(); + + for (AreaWindow *area_window : area_windows_) { + area_window->UpdateIndicators(); + } + + for (AreaPopup *area_popup : area_popups_) { + area_popup->UpdateIndicators(); + } +} + void TrackerPanel::OnPaint(wxPaintEvent &event) { if (GetSize() != rendered_.GetSize()) { Redraw(); -- cgit 1.4.1