From 531d2e221bae570cb9f6f4a4ce1b2a99e9a00a26 Mon Sep 17 00:00:00 2001 From: xenakios Date: Fri, 23 Feb 2018 02:16:41 +0200 Subject: [PATCH] Also allow moving time selection by dragging it from the top --- Source/PluginEditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index 340b0fb..037afa4 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -607,13 +607,13 @@ void WaveformComponent::mouseDrag(const MouseEvent & e) { if (m_didseek == true) return; - if (m_time_sel_drag_target == 0 && e.mods.isAnyModifierKeyDown()==false) + if (m_time_sel_drag_target == 0 && (e.mods.isAnyModifierKeyDown()==false && e.y>=50)) { m_time_sel_start = m_drag_time_start; m_time_sel_end = viewXToNormalized(e.x); } double curlen = m_time_sel_end - m_time_sel_start; - if (m_time_sel_drag_target == 0 && e.mods.isShiftDown()) + if (m_time_sel_drag_target == 0 && (e.mods.isShiftDown() || e.y<50)) { double diff = m_drag_time_start - viewXToNormalized(e.x); m_time_sel_start = jlimit(0.0, 1.0-curlen, m_time_sel_start - diff);