diff options
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. | 
