Replace "Ignore Entry" condition logic with SwitchButton toggle

This commit is contained in:
WarmUpTill
2026-05-01 18:59:47 +02:00
committed by WarmUpTill
parent c73a5866d7
commit 41866bcb24
15 changed files with 47 additions and 15 deletions

View File

@@ -80,7 +80,7 @@ bool MacroSegment::Save(obs_data_t *obj) const
obs_data_set_bool(data, "useCustomLabel", _useCustomLabel);
obs_data_set_string(data, "customLabel", _customLabel.c_str());
obs_data_set_bool(data, "enabled", _enabled);
obs_data_set_int(data, "version", 1);
obs_data_set_int(data, "version", 2);
OBSDataArrayAutoRelease mappingsArray = obs_data_array_create();
for (const auto &mapping : _varMappings) {
@@ -112,6 +112,12 @@ bool MacroSegment::Load(obs_data_t *obj)
_enabled = obs_data_get_bool(obj, "enabled");
}
// Reset the previously unused "enabled" value for conditions to "true"
if (obs_data_get_int(data, "version") < 2 &&
obs_data_has_user_value(obj, "logic")) {
_enabled = true;
}
_varMappings.clear();
OBSDataArrayAutoRelease mappingsArray =
obs_data_get_array(data, "varMappings");