Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion frontend/widgets/OBSBasic_Clipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ OBS::ItemPasteType OBSBasic::getItemPasteType()
return OBS::ItemPasteType::Invalid;
}

bool allowPastingReference = true;
bool allowPastingDuplicate = true;
for (size_t i = clipboard.size(); i > 0; i--) {
const size_t idx = i - 1;
Expand All @@ -290,6 +291,19 @@ OBS::ItemPasteType OBSBasic::getItemPasteType()
if (allowPastingDuplicate && obs_source_get_output_flags(strong) & OBS_SOURCE_DO_NOT_DUPLICATE) {
allowPastingDuplicate = false;
}

if (allowPastingReference && obs_source_is_group(strong)) {
allowPastingReference = false;
}
}
return allowPastingDuplicate ? OBS::ItemPasteType::Both : OBS::ItemPasteType::Reference;

if (allowPastingReference && allowPastingDuplicate) {
return OBS::ItemPasteType::Both;
} else if (allowPastingReference) {
return OBS::ItemPasteType::Reference;
} else if (allowPastingDuplicate) {
return OBS::ItemPasteType::Duplicate;
}

return OBS::ItemPasteType::Invalid;
}
3 changes: 2 additions & 1 deletion libobs/obs-scene.c
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,8 @@ obs_scene_t *obs_scene_duplicate(obs_scene_t *scene, const char *name, enum obs_

for (size_t i = 0; i < items.num; i++) {
item = items.array[i];
source = make_unique ? dup_child(&items, i, new_scene, make_private) : new_ref(item->source);
source = (make_unique || item->is_group) ? dup_child(&items, i, new_scene, make_private)
: new_ref(item->source);

if (source) {
struct obs_scene_item *new_item = obs_scene_add(new_scene, source);
Expand Down
Loading