gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

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:
Msource/jucePluginEditorLib/pluginEditor.cpp | 18++++++++++++++++++
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);