UI: Fix proprty Undo not updating settings properly
Settings would not update properly because obs_source_update() can only apply the settings value to the existing settings, so it could not remove values. This change fully erases existing settings and replaces it with the target settings instead.master
parent
6e05e8b325
commit
b685d1bf88
|
@ -58,7 +58,7 @@ void SourceToolbar::SetUndoProperties(obs_source_t *source)
|
|||
obs_data_t *settings = obs_data_create_from_json(data.c_str());
|
||||
obs_source_t *source = obs_get_source_by_name(
|
||||
obs_data_get_string(settings, "undo_sname"));
|
||||
obs_source_update(source, settings);
|
||||
obs_source_reset_settings(source, settings);
|
||||
|
||||
obs_source_t *scene_source =
|
||||
obs_get_source_by_name(scene_name.c_str());
|
||||
|
|
|
@ -368,7 +368,7 @@ void OBSBasicProperties::on_buttonBox_clicked(QAbstractButton *button)
|
|||
obs_data_create_from_json(data.c_str());
|
||||
obs_source_t *source = obs_get_source_by_name(
|
||||
obs_data_get_string(settings, "undo_sname"));
|
||||
obs_source_update(source, settings);
|
||||
obs_source_reset_settings(source, settings);
|
||||
|
||||
obs_source_update_properties(source);
|
||||
|
||||
|
|
Loading…
Reference in New Issue