Avoid mouse drag when the spectral module enable button has been clicked
This commit is contained in:
parent
6745f5443b
commit
d119439f76
@ -739,9 +739,13 @@ void SpectralChainEditor::mouseDown(const MouseEvent & ev)
|
|||||||
|
|
||||||
void SpectralChainEditor::mouseDrag(const MouseEvent & ev)
|
void SpectralChainEditor::mouseDrag(const MouseEvent & ev)
|
||||||
{
|
{
|
||||||
|
int box_w = getWidth() / m_order.size();
|
||||||
|
juce::Rectangle<int> r(box_w*m_cur_index, 1, 12, 12);
|
||||||
|
if (r.contains(ev.x, ev.y))
|
||||||
|
return;
|
||||||
if (m_cur_index >= 0 && m_cur_index < m_order.size())
|
if (m_cur_index >= 0 && m_cur_index < m_order.size())
|
||||||
{
|
{
|
||||||
int box_w = getWidth() / m_order.size();
|
|
||||||
int box_h = getHeight();
|
int box_h = getHeight();
|
||||||
int new_index = ev.x / box_w;
|
int new_index = ev.x / box_w;
|
||||||
if (new_index >= 0 && new_index < m_order.size() && new_index != m_cur_index)
|
if (new_index >= 0 && new_index < m_order.size() && new_index != m_cur_index)
|
||||||
|
Loading…
Reference in New Issue
Block a user