Skip to content

Commit

Permalink
Add ability to clone channels inside groups
Browse files Browse the repository at this point in the history
  • Loading branch information
gvnnz committed Jul 27, 2024
1 parent d02fe87 commit 29f54c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/channels/channelManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ Channel& ChannelManager::cloneChannel(ID channelId, int bufferSize, const std::v

newChannelData.channel.plugins = plugins;

/* If was grouped, add the new channel to the original channel group. */

if (oldChannel.isGrouped())
m_model.get().channels.get(oldChannel.parentId).groupChannel->addChild(newChannelData.channel.id);

/* Then push the new channel in the channels vector. */

m_model.get().channels.add(std::move(newChannelData.channel));
Expand Down

0 comments on commit 29f54c3

Please sign in to comment.