Skip to content

Commit 1ca8b8e

Browse files
committed
Hot fix for reversed scroll direction when dragging input above or below Qt piano roll view.
1 parent c075043 commit 1ca8b8e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/drivers/Qt/TasEditor/TasEditorWindow.cpp

+11-3
Original file line numberDiff line numberDiff line change
@@ -5802,9 +5802,13 @@ void QPianoRoll::periodicUpdate(void)
58025802

58035803
d = scroll_y / pxLineSpacing;
58045804

5805-
v += d; scroll_y = 0;
5805+
v -= d; scroll_y = 0;
58065806

5807-
if ( v > maxLineOffset )
5807+
if ( v < 0 )
5808+
{
5809+
v = 0;
5810+
}
5811+
else if ( v > maxLineOffset )
58085812
{
58095813
v = maxLineOffset;
58105814
}
@@ -5821,12 +5825,16 @@ void QPianoRoll::periodicUpdate(void)
58215825

58225826
d = scroll_y / pxLineSpacing;
58235827

5824-
v += d; scroll_y = 0;
5828+
v -= d; scroll_y = 0;
58255829

58265830
if ( v < 0 )
58275831
{
58285832
v = 0;
58295833
}
5834+
else if ( v > maxLineOffset )
5835+
{
5836+
v = maxLineOffset;
5837+
}
58305838
vbar->setValue(v);
58315839
}
58325840
}

0 commit comments

Comments
 (0)