web: Make sure settings are loaded correctly
This commit is contained in:
parent
1bf1a56b01
commit
016d47b9d7
@ -66,6 +66,14 @@ namespace hex {
|
|||||||
} else {
|
} else {
|
||||||
s_settings = nlohmann::json::parse(data);
|
s_settings = nlohmann::json::parse(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const auto &[category, rest] : *impl::s_onChangeCallbacks) {
|
||||||
|
for (const auto &[name, callbacks] : rest) {
|
||||||
|
for (const auto &[id, callback] : callbacks) {
|
||||||
|
callback(getSetting(category, name, {}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void store() {
|
void store() {
|
||||||
|
@ -390,10 +390,8 @@ namespace hex::plugin::builtin {
|
|||||||
|
|
||||||
if (outVars.contains(m_name)) {
|
if (outVars.contains(m_name)) {
|
||||||
std::visit(wolv::util::overloaded {
|
std::visit(wolv::util::overloaded {
|
||||||
[this](const std::string &) {
|
[](const std::string &) {},
|
||||||
},
|
[](const std::shared_ptr<pl::ptrn::Pattern> &) {},
|
||||||
[this](const std::shared_ptr<pl::ptrn::Pattern> &) {
|
|
||||||
},
|
|
||||||
[this](auto &&value) {
|
[this](auto &&value) {
|
||||||
std::vector<u8> buffer(std::min<size_t>(sizeof(value), 8));
|
std::vector<u8> buffer(std::min<size_t>(sizeof(value), 8));
|
||||||
std::memcpy(buffer.data(), &value, buffer.size());
|
std::memcpy(buffer.data(), &value, buffer.size());
|
||||||
|
Loading…
Reference in New Issue
Block a user