diff --git a/src/history.hpp b/src/history.hpp index 110db72..8300427 100644 --- a/src/history.hpp +++ b/src/history.hpp @@ -63,8 +63,8 @@ public: } } - void display() { - if (ImGui::Begin("History")) { + void display(bool& show) { + if (ImGui::Begin("History", &show)) { for (auto it = next_actions.crbegin(); it != next_actions.crend(); ++it) { ImGui::TextUnformatted((*it)->get_message().c_str()); if (*last_saved_action == *it) { diff --git a/src/main.cpp b/src/main.cpp index 8396344..4c17215 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -438,7 +438,7 @@ int main() { window.clear(sf::Color(0, 0, 0)); if (editor_state->showHistory) { - editor_state->chart_state->history.display(); + editor_state->chart_state->history.display(editor_state->showHistory); } if (editor_state->showPlayfield) { editor_state->display_playfield(marker, markerEndingState);