Also allow moving time selection by dragging it from the top
This commit is contained in:
parent
f47e848f19
commit
531d2e221b
@ -607,13 +607,13 @@ void WaveformComponent::mouseDrag(const MouseEvent & e)
|
|||||||
{
|
{
|
||||||
if (m_didseek == true)
|
if (m_didseek == true)
|
||||||
return;
|
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_start = m_drag_time_start;
|
||||||
m_time_sel_end = viewXToNormalized(e.x);
|
m_time_sel_end = viewXToNormalized(e.x);
|
||||||
}
|
}
|
||||||
double curlen = m_time_sel_end - m_time_sel_start;
|
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);
|
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);
|
m_time_sel_start = jlimit<double>(0.0, 1.0-curlen, m_time_sel_start - diff);
|
||||||
|
Loading…
Reference in New Issue
Block a user