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.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/tracker_panel.cpp b/src/tracker_panel.cpp index b4e6697..64e6ab3 100644 --- a/src/tracker_panel.cpp +++ b/src/tracker_panel.cpp
@@ -50,13 +50,19 @@ TrackerPanel::TrackerPanel(wxWindow *parent) : wxPanel(parent, wxID_ANY) {
50 Bind(wxEVT_MOTION, &TrackerPanel::OnMouseMove, this); 50 Bind(wxEVT_MOTION, &TrackerPanel::OnMouseMove, this);
51} 51}
52 52
53void TrackerPanel::UpdateIndicators() { 53void TrackerPanel::UpdateIndicators(bool reset) {
54 if (panels_mode_ && !savedata_path_) { 54 if (panels_mode_ && !savedata_path_) {
55 solved_panels_ = IPC_GetSolvedPanels(); 55 solved_panels_ = IPC_GetSolvedPanels();
56 } 56 }
57 57
58 for (AreaIndicator &area : areas_) { 58 if (reset) {
59 area.popup->UpdateIndicators(); 59 for (AreaIndicator &area : areas_) {
60 area.popup->ResetIndicators();
61 }
62 } else {
63 for (AreaIndicator &area : areas_) {
64 area.popup->UpdateIndicators();
65 }
60 } 66 }
61 67
62 Redraw(); 68 Redraw();
@@ -74,6 +80,7 @@ void TrackerPanel::SetSavedataPath(std::string savedata_path) {
74 savedata_path_ = savedata_path; 80 savedata_path_ = savedata_path;
75 panels_mode_ = true; 81 panels_mode_ = true;
76 82
83 UpdateIndicators(/*reset=*/true);
77 RefreshSavedata(); 84 RefreshSavedata();
78} 85}
79 86
@@ -90,7 +97,7 @@ void TrackerPanel::RefreshSavedata() {
90 } 97 }
91 } 98 }
92 99
93 UpdateIndicators(); 100 UpdateIndicators(/*reset=*/false);
94 Refresh(); 101 Refresh();
95} 102}
96 103