Automtion Editor - left click response

When you left click an existing value the automation point will only
snap to the new value if it is higher. If it is lower the mouse click
event will 'break'.

Cleanup. Remove statement that will always evaluate as 'true'.
This commit is contained in:
Oskar Wallgren
2017-11-18 15:03:37 +01:00
parent 01265ace66
commit b68dc572a3
2 changed files with 2 additions and 5 deletions

View File

@@ -517,16 +517,13 @@ void AutomationEditor::mousePressEvent( QMouseEvent* mouseEvent )
// loop through whole time-map...
while( it != time_map.end() )
{
MidiTime len = 4;
// and check whether the user clicked on an
// existing value
if( pos_ticks >= it.key() &&
len > 0 &&
( it+1==time_map.end() ||
pos_ticks <= (it+1).key() ) &&
( pos_ticks<= it.key() + MidiTime::ticksPerTact() *4 / m_ppt ) &&
level <= it.value() )
level == it.value() )
{
break;
}