From 6880dfcbeedf668be6b1413da5ac598a6fe0bd21 Mon Sep 17 00:00:00 2001 From: gir489 Date: Thu, 28 May 2020 17:53:16 -0400 Subject: [PATCH] Fixed combo example not saving the example configuration when changed. --- BigBaseV2/src/gui/base_tab.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BigBaseV2/src/gui/base_tab.cpp b/BigBaseV2/src/gui/base_tab.cpp index 038f7601..e3473b31 100644 --- a/BigBaseV2/src/gui/base_tab.cpp +++ b/BigBaseV2/src/gui/base_tab.cpp @@ -27,7 +27,8 @@ namespace big g_settings.save(); if (ImGui::SliderScalar("Double", ImGuiDataType_Double, g_settings.options["demo double"].get(), &min, &max)) //JSON does not describe rational numbers as integer/float/double/etc types, it is just "number". See: https://nlohmann.github.io/json/ g_settings.save(); - ImGui::Combo("Combo", (PINT)g_settings.options["demo combo"].get(), demo_combo, sizeof(demo_combo) / sizeof(*demo_combo)); + if (ImGui::Combo("Combo", (PINT)g_settings.options["demo combo"].get(), demo_combo, sizeof(demo_combo) / sizeof(*demo_combo))) + g_settings.save(); if (ImGui::Button("Spawn an Adder")) {