Skip to content

Commit

Permalink
fix glitch in Automation Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
zonkmachine committed May 26, 2024
1 parent 99803f5 commit bbb4e0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/editors/AutomationEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1647,12 +1647,12 @@ float AutomationEditor::getLevel(int y )
{
int level_line_y = height() - SCROLLBAR_SIZE - 1;
// pressed level
float level = roundf( ( m_bottomLevel + ( m_y_auto ?
float level = std::roundf( ( m_bottomLevel + ( m_y_auto ?
( m_maxLevel - m_minLevel ) * ( level_line_y - y )
/ (float)( level_line_y - ( TOP_MARGIN + 2 ) ) :
( level_line_y - y ) / (float)m_y_delta ) ) / m_step ) * m_step;
// some range-checking-stuff
level = qBound( m_bottomLevel, level, m_topLevel );
level = qBound(std::roundf(m_bottomLevel), level, std::roundf(m_topLevel));

return( level );
}
Expand Down

0 comments on commit bbb4e0f

Please sign in to comment.