File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -2067,16 +2067,27 @@ void RichTextLabel::gui_input(const Ref<InputEvent> &p_event) {
20672067 }
20682068 }
20692069
2070+ bool scroll_value_modified = false ;
2071+ double prev_scroll = vscroll->get_value ();
2072+
20702073 if (b->get_button_index () == MouseButton::WHEEL_UP) {
20712074 if (scroll_active) {
20722075 vscroll->scroll (-vscroll->get_page () * b->get_factor () * 0.5 / 8 );
2076+ scroll_value_modified = true ;
20732077 }
20742078 }
20752079 if (b->get_button_index () == MouseButton::WHEEL_DOWN) {
20762080 if (scroll_active) {
20772081 vscroll->scroll (vscroll->get_page () * b->get_factor () * 0.5 / 8 );
2082+ scroll_value_modified = true ;
20782083 }
20792084 }
2085+
2086+ if (scroll_value_modified && vscroll->get_value () != prev_scroll) {
2087+ accept_event ();
2088+ return ;
2089+ }
2090+
20802091 if (b->get_button_index () == MouseButton::RIGHT && context_menu_enabled) {
20812092 _update_context_menu ();
20822093 menu->set_position (get_screen_position () + b->get_position ());
You can’t perform that action at this time.
0 commit comments