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 73a752fe5b10b7d3284a5baea50b12df9a40a073
parent 80deab7e4dfd39f4113d183baae1110b8c58badc
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Sun, 14 Jul 2024 14:43:52 +0200

fix drag & drop issue

Diffstat:
Msource/jucePluginEditorLib/patchmanager/griditemcontainer.cpp | 5+++++
Msource/jucePluginEditorLib/patchmanager/griditemcontainer.h | 1+
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/source/jucePluginEditorLib/patchmanager/griditemcontainer.cpp b/source/jucePluginEditorLib/patchmanager/griditemcontainer.cpp @@ -12,6 +12,7 @@ namespace jucePluginEditorLib::patchManager void GridItemContainer::mouseDown(const juce::MouseEvent& _e) { Component::mouseDown(_e); + m_isDragging = false; m_itemIndexMouseDown = mouseToItemIndex(_e); } @@ -67,6 +68,9 @@ namespace jucePluginEditorLib::patchManager { m_itemIndexMouseDown = InvalidItem; + if(m_isDragging) + return; + juce::SparseSet<int> rows; const auto hoveredIndex = mouseToItemIndex(_e); if(m_grid.isSelected(hoveredIndex)) @@ -87,6 +91,7 @@ namespace jucePluginEditorLib::patchManager const auto p = juce::Point<int> (x, y) - _e.getEventRelativeTo (this).position.toInt(); dragContainer->startDragging (dragDescription, &m_grid, dragImage, true, &p, &_e.source); + m_isDragging = true; } } } diff --git a/source/jucePluginEditorLib/patchmanager/griditemcontainer.h b/source/jucePluginEditorLib/patchmanager/griditemcontainer.h @@ -23,5 +23,6 @@ namespace jucePluginEditorLib::patchManager Grid& m_grid; uint32_t m_itemIndexMouseDown = InvalidItem; + bool m_isDragging = false; }; }