about summary refs log tree commit diff stats
path: root/src/tracker_panel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tracker_panel.cpp')
-rw-r--r--src/tracker_panel.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tracker_panel.cpp b/src/tracker_panel.cpp index 2f2d596..04b970c 100644 --- a/src/tracker_panel.cpp +++ b/src/tracker_panel.cpp
@@ -51,6 +51,10 @@ TrackerPanel::TrackerPanel(wxWindow *parent) : wxPanel(parent, wxID_ANY) {
51} 51}
52 52
53void TrackerPanel::UpdateIndicators() { 53void TrackerPanel::UpdateIndicators() {
54 if (panels_mode_ && !savedata_path_) {
55 solved_panels_ = IPC_GetSolvedPanels();
56 }
57
54 for (AreaIndicator &area : areas_) { 58 for (AreaIndicator &area : areas_) {
55 area.popup->UpdateIndicators(); 59 area.popup->UpdateIndicators();
56 } 60 }
@@ -58,8 +62,10 @@ void TrackerPanel::UpdateIndicators() {
58 Redraw(); 62 Redraw();
59} 63}
60 64
65void TrackerPanel::SetPanelsMode() { panels_mode_ = true; }
66
61void TrackerPanel::SetSavedataPath(std::string savedata_path) { 67void TrackerPanel::SetSavedataPath(std::string savedata_path) {
62 if (!panels_mode_) { 68 if (!savedata_path_) {
63 wxButton *refresh_button = 69 wxButton *refresh_button =
64 new wxButton(this, wxID_ANY, "Refresh", {15, 15}); 70 new wxButton(this, wxID_ANY, "Refresh", {15, 15});
65 refresh_button->Bind(wxEVT_BUTTON, &TrackerPanel::OnRefreshSavedata, this); 71 refresh_button->Bind(wxEVT_BUTTON, &TrackerPanel::OnRefreshSavedata, this);
@@ -216,7 +222,7 @@ void TrackerPanel::Redraw() {
216 if (panel.non_counting) { 222 if (panel.non_counting) {
217 has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id); 223 has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id);
218 } else { 224 } else {
219 has_unchecked = !solved_panels_.contains(panel.nodepath); 225 has_unchecked = !GetSolvedPanels().contains(panel.nodepath);
220 } 226 }
221 } 227 }
222 } else if (AP_IsLocationVisible(section.classification)) { 228 } else if (AP_IsLocationVisible(section.classification)) {