From b4f345680f6df23127523ebab796ad8ca3d50cba Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 15 Jul 2018 18:58:53 -0700 Subject: [PATCH] UI: Allow copying/pasting of groups Allows copying and pasting of groups. The user can fully duplicate the group, or create a reference of the group. The user cannot paste a reference of the group if it already exists within the same scene however. --- UI/window-basic-main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 575f5677c..2b7b4fdfa 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -6106,8 +6106,6 @@ void OBSBasic::on_actionCopySource_triggered() OBSSceneItem item = GetCurrentSceneItem(); if (!item) return; - if (!!obs_sceneitem_is_group(item)) - return; on_actionCopyTransform_triggered(); @@ -6127,6 +6125,11 @@ void OBSBasic::on_actionCopySource_triggered() void OBSBasic::on_actionPasteRef_triggered() { + /* do not allow duplicate refs of the same group in the same scene */ + OBSScene scene = GetCurrentScene(); + if (!!obs_scene_get_group(scene, copyString)) + return; + OBSBasicSourceSelect::SourcePaste(copyString, copyVisible, false); on_actionPasteTransform_triggered(); }