UI: Add Undo/Redo for single filter copy/paste
Closes obsproject/obs-studio#4616
This commit is contained in:
parent
d7e4945eab
commit
ec25ade9f2
@ -275,6 +275,7 @@ Undo.Item.Undo="Undo %1"
|
||||
Undo.Item.Redo="Redo %1"
|
||||
Undo.Sources.Multi="Delete %1 Sources"
|
||||
Undo.Filters="Filter Changes on '%1'"
|
||||
Undo.Filters.Paste.Single="Paste Filter '%1' to '%2'"
|
||||
Undo.Filters.Paste.Multiple="Copy Filters from '%1' to '%2'"
|
||||
Undo.Transform="Transform source(s) In '%1'"
|
||||
Undo.Transform.Paste="Paste Transformation in '%1'"
|
||||
|
@ -1160,7 +1160,20 @@ void OBSBasicFilters::PasteFilter()
|
||||
if (!filter)
|
||||
return;
|
||||
|
||||
obs_data_array_t *undo_array = obs_source_backup_filters(source);
|
||||
obs_source_copy_single_filter(source, filter);
|
||||
obs_data_array_t *redo_array = obs_source_backup_filters(source);
|
||||
|
||||
const char *filterName = obs_source_get_name(filter);
|
||||
const char *sourceName = obs_source_get_name(source);
|
||||
QString text =
|
||||
QTStr("Undo.Filters.Paste.Single").arg(filterName, sourceName);
|
||||
|
||||
main->CreateFilterPasteUndoRedoAction(text, source, undo_array,
|
||||
redo_array);
|
||||
|
||||
obs_data_array_release(undo_array);
|
||||
obs_data_array_release(redo_array);
|
||||
}
|
||||
|
||||
void OBSBasicFilters::delete_filter(OBSSource filter)
|
||||
|
Loading…
x
Reference in New Issue
Block a user