diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-03-13 11:55:55 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-03-13 11:55:55 -0400 |
| commit | dacbe8e3fbda85f7c2e7e7b660795f2a080a9d25 (patch) | |
| tree | 65f201e323d5d6a36291ec5a108c4b14649116da /src/tracker_frame.cpp | |
| parent | f4945731a958371d206ccfa4a34486b263be5b21 (diff) | |
| download | lingo-ap-tracker-dacbe8e3fbda85f7c2e7e7b660795f2a080a9d25.tar.gz lingo-ap-tracker-dacbe8e3fbda85f7c2e7e7b660795f2a080a9d25.tar.bz2 lingo-ap-tracker-dacbe8e3fbda85f7c2e7e7b660795f2a080a9d25.zip | |
Use sync fields for hunt panels
Diffstat (limited to 'src/tracker_frame.cpp')
| -rw-r--r-- | src/tracker_frame.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
| diff --git a/src/tracker_frame.cpp b/src/tracker_frame.cpp index fa68582..84017a3 100644 --- a/src/tracker_frame.cpp +++ b/src/tracker_frame.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <wx/stdpaths.h> | 9 | #include <wx/stdpaths.h> |
| 10 | #include <wx/webrequest.h> | 10 | #include <wx/webrequest.h> |
| 11 | 11 | ||
| 12 | #include <algorithm> | ||
| 12 | #include <nlohmann/json.hpp> | 13 | #include <nlohmann/json.hpp> |
| 13 | #include <sstream> | 14 | #include <sstream> |
| 14 | 15 | ||
| @@ -358,10 +359,17 @@ void TrackerFrame::OnStateChanged(StateChangedEvent &event) { | |||
| 358 | 359 | ||
| 359 | return; | 360 | return; |
| 360 | } | 361 | } |
| 362 | |||
| 363 | bool hunt_panels = false; | ||
| 364 | if (GetTrackerConfig().show_hunt_panels) { | ||
| 365 | hunt_panels = std::any_of( | ||
| 366 | state.panels.begin(), state.panels.end(), [](int solve_index) { | ||
| 367 | return GD_GetPanel(GD_GetPanelBySolveIndex(solve_index)).hunt; | ||
| 368 | }); | ||
| 369 | } | ||
| 361 | 370 | ||
| 362 | if (!state.items.empty() || !state.paintings.empty() || | 371 | if (!state.items.empty() || !state.paintings.empty() || |
| 363 | state.cleared_locations || | 372 | state.cleared_locations || hunt_panels) { |
| 364 | (state.hunt_panels && GetTrackerConfig().show_hunt_panels)) { | ||
| 365 | // TODO: The only real reason to reset tracker_panel during an active | 373 | // TODO: The only real reason to reset tracker_panel during an active |
| 366 | // connection is if the hunt panels setting changes. If we remove hunt | 374 | // connection is if the hunt panels setting changes. If we remove hunt |
| 367 | // panels later, we can get rid of this. | 375 | // panels later, we can get rid of this. |
