Skip to content

Commit

Permalink
final bugfixes to the new source menu
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreRouma committed Nov 7, 2024
1 parent b835d07 commit 6891d0b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/src/gui/menus/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ namespace sourcemenu {
core::configManager.acquire();

// Load custom offsets
namedOffsets = (std::map<std::string, double>)core::configManager.conf["offsets"];
auto ofs = core::configManager.conf["offsets"].items();
for (auto& o : ofs) {
namedOffsets[o.key()] = (double)o.value();
}

// Define custom offsets
for (auto& [name, offset] : namedOffsets) {
offsets.define(name, offsets.size());
}
Expand Down Expand Up @@ -349,7 +354,7 @@ namespace sourcemenu {
if (ImGui::InputDouble("##freq_offset", &manualOffset, 1.0, 100.0)) {
updateOffset();
core::configManager.acquire();
core::configManager.conf["offset"] = manualOffset;
core::configManager.conf["manualOffset"] = manualOffset;
core::configManager.release(true);
}
}
Expand Down

0 comments on commit 6891d0b

Please sign in to comment.