mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-19 17:49:14 +00:00
UI: Disallow pasting duplicates of sources with DO_NOT_DUPLICATE
This commit prevents users from being able to use the "Paste (Duplicate)" context menu option after copying a source that has the OBS_SOURCE_DO_NOT_DUPLICATE flag set. Though OBS would correctly paste the source as a reference, it seems that this behavior was confusing some users. This fixes Mantis Bug 1034.
This commit is contained in:
parent
a76b919c6e
commit
0fe4688a34
|
@ -5757,7 +5757,12 @@ void OBSBasic::on_actionCopySource_triggered()
|
|||
copyVisible = obs_sceneitem_visible(item);
|
||||
|
||||
ui->actionPasteRef->setEnabled(true);
|
||||
ui->actionPasteDup->setEnabled(true);
|
||||
|
||||
uint32_t output_flags = obs_source_get_output_flags(source);
|
||||
if ((output_flags & OBS_SOURCE_DO_NOT_DUPLICATE) == 0)
|
||||
ui->actionPasteDup->setEnabled(true);
|
||||
else
|
||||
ui->actionPasteDup->setEnabled(false);
|
||||
}
|
||||
|
||||
void OBSBasic::on_actionPasteRef_triggered()
|
||||
|
|
Loading…
Reference in a new issue