Also allow moving time selection by dragging it from the top

This commit is contained in:
xenakios 2018-02-23 02:16:41 +02:00
parent f47e848f19
commit 531d2e221b

View File

@ -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<double>(0.0, 1.0-curlen, m_time_sel_start - diff);