ScrollBar: fixed jittery scrolling when in repeating mode (hold down mouse button) and smooth scrolling enabled

This commit is contained in:
Karl Tauber
2020-08-11 10:13:55 +02:00
parent 1ae31588c4
commit 305e9e602e
2 changed files with 12 additions and 3 deletions

View File

@@ -477,13 +477,13 @@ public class FlatScrollBarUI
if( useValueIsAdjusting )
scrollbar.setValueIsAdjusting( true );
int oldValue = scrollbar.getValue();
// if invoked while animation is running, calculation of new value
// should start at the previous target value
if( targetValue != Integer.MIN_VALUE )
scrollbar.setValue( targetValue );
int oldValue = scrollbar.getValue();
r.run();
// do not use animation if started dragging thumb