commit 729dbcfa6a3683aeb317d1329219393009d2d4bd
parent 7795202891079b0eda2e905d9d25035451e2f130
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Thu, 30 May 2024 22:33:34 +0200
add lock/unlock options to parameter context menu
Diffstat:
1 file changed, 18 insertions(+), 0 deletions(-)
diff --git a/source/jucePluginEditorLib/pluginEditor.cpp b/source/jucePluginEditorLib/pluginEditor.cpp
@@ -275,6 +275,24 @@ namespace jucePluginEditorLib
{
const auto& regionName = regions.find(regionId)->second.getName();
+ const auto isLocked = controller.getParameterLocking().isRegionLocked(regionId);
+
+ menu.addItem(std::string(isLocked ? "Unlock" : "Lock") + std::string(" region '") + regionName + "'", [this, regionId, isLocked]
+ {
+ auto& locking = m_processor.getController().getParameterLocking();
+ if(isLocked)
+ locking.unlockRegion(regionId);
+ else
+ locking.lockRegion(regionId);
+ });
+ }
+
+ menu.addSeparator();
+
+ for (const auto& regionId : paramRegionIds)
+ {
+ const auto& regionName = regions.find(regionId)->second.getName();
+
menu.addItem(std::string("Copy region '") + regionName + "'", [this, regionId]
{
copyRegionToClipboard(regionId);