UI: Don't save defaults in oldSettings in properties
The default settings were saved in the oldSettings variable of the properties dialog in `86eb7ae` to be able to restore default settings in undo/redo, but this doesn't actually do anything. Besides this, it introduced a bug where clicking "Cancel" in the properties dialog would save all settings, including default ones, as well as a bug where not changing anything in the properties dialog would still add an undo action.
This commit is contained in:
@@ -79,10 +79,7 @@ OBSBasicProperties::OBSBasicProperties(QWidget *parent, OBSSource source_)
|
||||
obs_data_release(oldSettings);
|
||||
|
||||
OBSData nd_settings = obs_source_get_settings(source);
|
||||
OBSData settings = obs_data_get_defaults(nd_settings);
|
||||
obs_data_apply(settings, nd_settings);
|
||||
obs_data_apply(oldSettings, settings);
|
||||
obs_data_release(settings);
|
||||
obs_data_apply(oldSettings, nd_settings);
|
||||
obs_data_release(nd_settings);
|
||||
|
||||
auto handle_memory = [](void *vp, obs_data_t *old_settings,
|
||||
|
Reference in New Issue
Block a user