Fix Qt deprecated mousewheel delta() functions (#5974)

* Replace deprecated mousewheel delta() function
This commit is contained in:
Lost Robot
2021-04-03 14:10:02 -06:00
committed by GitHub
parent 8d9c7347ba
commit 7ac627da65
2 changed files with 2 additions and 2 deletions

View File

@@ -641,7 +641,7 @@ void CompressorControlDialog::resizeEvent(QResizeEvent *event)
void CompressorControlDialog::wheelEvent(QWheelEvent * event)
{
const float temp = m_dbRange;
const float dbRangeNew = m_dbRange - copysignf(COMP_GRID_SPACING, event->delta());
const float dbRangeNew = m_dbRange - copysignf(COMP_GRID_SPACING, event->angleDelta().y());
m_dbRange = round(qBound(COMP_GRID_SPACING, dbRangeNew, COMP_GRID_MAX) / COMP_GRID_SPACING) * COMP_GRID_SPACING;
// Only reset view if the scolling had an effect