commit 3cc945c53cdd4f7071d44ef9996611e7b380539e
parent 33ebb1d8d7bb42b4abd675a3ee787a0a55b4b406
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Thu, 6 Mar 2025 23:04:10 +0100
disable context menu on wave editor graphs
Diffstat:
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/source/jucePluginEditorLib/pluginEditorState.h b/source/jucePluginEditorLib/pluginEditorState.h
@@ -45,7 +45,7 @@ namespace jucePluginEditorLib
const Skin& getCurrentSkin() { return m_currentSkin; }
const std::vector<Skin>& getIncludedSkins();
- void openMenu(const juce::MouseEvent* _event);
+ virtual void openMenu(const juce::MouseEvent* _event);
std::function<void(int)> evSetGuiScale;
std::function<void(juce::Component*)> evSkinLoaded;
diff --git a/source/xtJucePlugin/PluginEditorState.cpp b/source/xtJucePlugin/PluginEditorState.cpp
@@ -5,6 +5,8 @@
#include "skins.h"
+#include "weGraph.h"
+
namespace xtJucePlugin
{
PluginEditorState::PluginEditorState(AudioPluginAudioProcessor& _processor) : jucePluginEditorLib::PluginEditorState(_processor, _processor.getController(), g_includedSkins)
@@ -60,6 +62,13 @@ namespace xtJucePlugin
return true;
}
+ void PluginEditorState::openMenu(const juce::MouseEvent* _event)
+ {
+ if (dynamic_cast<Graph*>(_event->eventComponent))
+ return;
+ jucePluginEditorLib::PluginEditorState::openMenu(_event);
+ }
+
jucePluginEditorLib::Editor* PluginEditorState::createEditor(const jucePluginEditorLib::Skin& _skin)
{
diff --git a/source/xtJucePlugin/PluginEditorState.h b/source/xtJucePlugin/PluginEditorState.h
@@ -17,6 +17,8 @@ namespace xtJucePlugin
explicit PluginEditorState(AudioPluginAudioProcessor& _processor);
void initContextMenu(juce::PopupMenu& _menu) override;
bool initAdvancedContextMenu(juce::PopupMenu& _menu, bool _enabled) override;
+ void openMenu(const juce::MouseEvent* _event) override;
+
private:
jucePluginEditorLib::Editor* createEditor(const jucePluginEditorLib::Skin& _skin) override;
};