Skip to content

Commit

Permalink
Fix Automation Point delete radius
Browse files Browse the repository at this point in the history
  • Loading branch information
zonkmachine committed Oct 22, 2017
1 parent fbfcb43 commit 26225c6
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/gui/editors/AutomationEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,25 @@ void AutomationEditor::mouseMoveEvent(QMouseEvent * mouseEvent )
{
// int resolution needed to improve the sensitivity of
// the erase manoeuvre with zoom levels < 100%
int zoom = m_zoomingXModel.value();
int resolution = 1 + zoom * zoom;
int resolution = 1;
switch( m_zoomingXModel.value() )
{
case 0: resolution = 32;
break;
case 1: resolution = 16;
break;
case 2: resolution = 8;
break;
case 3: resolution = 5;
break;
case 4: resolution = 3;
break;
case 5: resolution = 2;
break;
case 6: resolution = 1;
break;
}

for( int i = -resolution; i < resolution; ++i )
{
m_pattern->removeValue( MidiTime( pos_ticks + i ) );
Expand Down

0 comments on commit 26225c6

Please sign in to comment.