Skip to content

Commit

Permalink
save flag works
Browse files Browse the repository at this point in the history
  • Loading branch information
dennispelle committed Oct 11, 2023
1 parent 6e6298a commit ca5f855
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ int main() {
if (ImGui::BeginPopupModal("Speichern der aufgenommenen Daten", nullptr,
ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::SetItemDefaultFocus();
saves_popup(config, language, captureData, now, now_time_t, now_tm, path);
saves_popup(config, language, captureData, now, now_time_t, now_tm, path,
flagDataNotSaved);

ImGui::SameLine();
if (ImGui::Button(
Expand Down
4 changes: 3 additions & 1 deletion src/saves_popup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ void saves_popup(nlohmann::json const &config, nlohmann::json const &language,
std::map<Omniscope::Id, std::vector<std::pair<double, double>>>
&captureData,
std::chrono::system_clock::time_point &now,
std::time_t &now_time_t, std::tm &now_tm, std::string &path) {
std::time_t &now_time_t, std::tm &now_tm, std::string &path,
bool &flagDataNotSaved) {
ImGui::SetItemDefaultFocus();

static std::string inputvin;
Expand All @@ -78,6 +79,7 @@ void saves_popup(nlohmann::json const &config, nlohmann::json const &language,

if (ImGui::Button(load_json<std::string>(language, "button", "save").c_str(),
ImVec2(load_json<Size>(config, "button")))) {
flagDataNotSaved = false;
now = std::chrono::system_clock::now();

now_time_t = std::chrono::system_clock::to_time_t(now);
Expand Down

0 comments on commit ca5f855

Please sign in to comment.