From b8c70ddd301f5d96d50eed4f820c28395dd39aef Mon Sep 17 00:00:00 2001 From: xenakios Date: Fri, 9 Feb 2018 13:02:10 +0200 Subject: [PATCH] Mark plugin dirty when changing spectral module order or module enabled state. Readme change. --- Source/PluginEditor.cpp | 8 ++++++++ Source/PluginEditor.h | 1 + readme.txt | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 0cc6ea2..3354eb8 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -106,6 +106,10 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau m_parcomps[i]->setHighLighted(false); } }; + m_spec_order_ed.ModuleOrderOrEnabledChangedCallback = [this]() + { + processor.setDirty(); + }; startTimer(1, 100); startTimer(2, 1000); startTimer(3, 200); @@ -749,6 +753,8 @@ void SpectralChainEditor::mouseDown(const MouseEvent & ev) { m_order[m_cur_index].m_enabled = !m_order[m_cur_index].m_enabled; m_src->setSpectrumProcessOrder(m_order); + if (ModuleOrderOrEnabledChangedCallback) + ModuleOrderOrEnabledChangedCallback(); repaint(); return; } @@ -774,6 +780,8 @@ void SpectralChainEditor::mouseDrag(const MouseEvent & ev) m_cur_index = new_index; m_did_drag = true; m_src->setSpectrumProcessOrder(m_order); + if (ModuleOrderOrEnabledChangedCallback) + ModuleOrderOrEnabledChangedCallback(); } m_drag_x = ev.x; repaint(); diff --git a/Source/PluginEditor.h b/Source/PluginEditor.h index de96321..7f5982d 100644 --- a/Source/PluginEditor.h +++ b/Source/PluginEditor.h @@ -147,6 +147,7 @@ public: void mouseDrag(const MouseEvent& ev) override; void mouseUp(const MouseEvent& ev) override; std::function ModuleSelectedCallback; + std::function ModuleOrderOrEnabledChangedCallback; private: StretchAudioSource * m_src = nullptr; bool m_did_drag = false; diff --git a/readme.txt b/readme.txt index 5caa961..627a036 100644 --- a/readme.txt +++ b/readme.txt @@ -8,7 +8,7 @@ Released under GNU General Public License v.2 license. History : -02-07-2018 1.0.0 +02-09-2018 1.0.0 -Control/Command click on waveform seeks (if click within active play range) -Moved prebuffering amount menu to prebuffering meter (click to show) -Added dummy parameter to tell the host the plugin state has changed when the imported file has changed etc