Fixed mouse wheel scroll direction on Qt trace logger and TAS piano roll.

This commit is contained in:
mjbudd77 2021-12-12 15:42:37 -05:00
parent c596593fd0
commit c72eac9970
2 changed files with 4 additions and 4 deletions

View File

@ -4566,7 +4566,7 @@ void QPianoRoll::wheelEvent(QWheelEvent *event)
if (!numPixels.isNull())
{
wheelPixelCounter -= numPixels.y();
wheelPixelCounter += numPixels.y();
//printf("numPixels: (%i,%i) \n", numPixels.x(), numPixels.y() );
}
else if (!numDegrees.isNull())
@ -4574,7 +4574,7 @@ void QPianoRoll::wheelEvent(QWheelEvent *event)
//QPoint numSteps = numDegrees / 15;
//printf("numSteps: (%i,%i) \n", numSteps.x(), numSteps.y() );
//printf("numDegrees: (%i,%i) %i\n", numDegrees.x(), numDegrees.y(), pxLineSpacing );
wheelPixelCounter -= (pxLineSpacing * numDegrees.y()) / (15 * 8);
wheelPixelCounter += (pxLineSpacing * numDegrees.y()) / (15 * 8);
}
//printf("Wheel Event: %i\n", wheelPixelCounter);

View File

@ -1751,7 +1751,7 @@ void QTraceLogView::wheelEvent(QWheelEvent *event)
if (!numPixels.isNull())
{
wheelPixelCounter -= numPixels.y();
wheelPixelCounter += numPixels.y();
//printf("numPixels: (%i,%i) \n", numPixels.x(), numPixels.y() );
}
else if (!numDegrees.isNull())
@ -1759,7 +1759,7 @@ void QTraceLogView::wheelEvent(QWheelEvent *event)
//QPoint numSteps = numDegrees / 15;
//printf("numSteps: (%i,%i) \n", numSteps.x(), numSteps.y() );
//printf("numDegrees: (%i,%i) %i\n", numDegrees.x(), numDegrees.y(), pxLineSpacing );
wheelPixelCounter -= (pxLineSpacing * numDegrees.y()) / (15 * 8);
wheelPixelCounter += (pxLineSpacing * numDegrees.y()) / (15 * 8);
}
//printf("Wheel Event: %i\n", wheelPixelCounter);