Merge pull request #24801 from timoschwarzer/24773-fix-down-smooth-scroll

Fix jumping when scrolling down fast with smooth scroll enabled
This commit is contained in:
Rémi Verschelde 2019-01-06 13:10:03 +01:00 committed by GitHub
commit ba2e7f9bc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3259,7 +3259,6 @@ void TextEdit::_scroll_down(real_t p_delta) {
int max_v_scroll = round(v_scroll->get_max() - v_scroll->get_page());
if (target_v_scroll > max_v_scroll) {
target_v_scroll = max_v_scroll;
v_scroll->set_value(target_v_scroll);
}
if (Math::abs(target_v_scroll - v_scroll->get_value()) < 1.0) {
v_scroll->set_value(target_v_scroll);