-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TextEdit v_scroll_speed invalid values breaks wheel scrolling #58010
Fix TextEdit v_scroll_speed invalid values breaks wheel scrolling #58010
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the property hint, it's probably worth adding the same checks to the TextEdit::set_v_scroll_speed
and reject invalid values. Property hint will help when it's set from UI, but won't if it's set in the config file or set_v_scroll_speed
is called directly.
718bcdc
to
b6f1918
Compare
For too low values, should we set it to the minimum accepted value or should we return without modifying the value and throw an error/warning ? (I've pushed the first way but a doubt has raised now) Higher values are not really a problem. It will be "instant" scroll. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would suggest using ERR_FAIL_COND
rather then MAX
otherwise looks good.
b6f1918
to
876f14f
Compare
You're right. Done. |
876f14f
to
0d17903
Compare
Thanks! |
Fixes #58009
Issue description
Some values of text_editor/behavior/navigation/v_scroll_speed Editor settings breaks mouse wheel scrolling of TextEdit.
Identified causes
Fix proposal
Add hint_range "1, 10000,1" in property declaration
10000 leads to immediately scroll to destination. As comparison, clicking on minimap leads to a 3000 scrolling speed and is already nearly instantaneous.
Ensure that scrolling speed is equal or greater than the scrollbar step to prevent blocking mouse wheel scroll.
After (I roll the mouse wheel a LOT to see the scrolling speed)