UI: Avoid calling obs_source_update multiple times
When we added undo/redo in 86eb7aeb a distinction between Updates and Visual updates was made, presumably for filters which need special handling of the update case. These functions were also added to regular source properties, but didnt use any special code instead calling obs_source_update an additional time after a short time. Instead lets remove the 2nd delayed call and only call obs_source_update once per settings change.
This commit is contained in:
parent
efce0f41d0
commit
ec05e1ff57
@ -86,20 +86,10 @@ OBSBasicProperties::OBSBasicProperties(QWidget *parent, OBSSource source_)
|
||||
OBSDataAutoRelease nd_settings = obs_source_get_settings(source);
|
||||
obs_data_apply(oldSettings, nd_settings);
|
||||
|
||||
auto handle_memory = [](void *vp, obs_data_t *old_settings,
|
||||
obs_data_t *new_settings) {
|
||||
obs_source_t *source = reinterpret_cast<obs_source_t *>(vp);
|
||||
|
||||
obs_source_update(source, new_settings);
|
||||
|
||||
UNUSED_PARAMETER(old_settings);
|
||||
UNUSED_PARAMETER(vp);
|
||||
};
|
||||
|
||||
view = new OBSPropertiesView(
|
||||
nd_settings.Get(), source,
|
||||
(PropertiesReloadCallback)obs_source_properties,
|
||||
(PropertiesUpdateCallback)handle_memory,
|
||||
(PropertiesUpdateCallback) nullptr, // No special handling required for undo/redo
|
||||
(PropertiesVisualUpdateCb)obs_source_update);
|
||||
view->setMinimumHeight(150);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user