Directional fix for Qt TAS piano roll vertical scroll bar page step

This commit is contained in:
mjbudd77 2021-12-20 20:57:13 -05:00
parent ef8e076bba
commit e79de93c18
1 changed files with 23 additions and 3 deletions

View File

@ -3865,7 +3865,7 @@ void QPianoRoll::vbarActionTriggered(int act)
if ( act == QAbstractSlider::SliderSingleStepAdd )
{
val = val - 1;
val = val - vbar->singleStep();
if ( val < 0 )
{
@ -3875,7 +3875,27 @@ void QPianoRoll::vbarActionTriggered(int act)
}
else if ( act == QAbstractSlider::SliderSingleStepSub )
{
val = val + 1;
val = val + vbar->singleStep();
if ( val >= maxLineOffset )
{
val = maxLineOffset;
}
vbar->setSliderPosition(val);
}
else if ( act == QAbstractSlider::SliderPageStepAdd )
{
val = val - vbar->pageStep();
if ( val < 0 )
{
val = 0;
}
vbar->setSliderPosition(val);
}
else if ( act == QAbstractSlider::SliderPageStepSub )
{
val = val + vbar->pageStep();
if ( val >= maxLineOffset )
{
@ -4157,7 +4177,7 @@ void QPianoRoll::resizeEvent(QResizeEvent *event)
}
vbar->setMinimum(0);
vbar->setMaximum(maxLineOffset);
vbar->setPageStep( (3*viewLines)/4 );
vbar->setPageStep( (7*viewLines)/8 );
if ( viewWidth >= pxLineWidth )
{