mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-23 01:27:17 +01:00
Disable scroll when dragging at edges of TextEdit
This commit is contained in:
parent
739b0c0c3f
commit
69976cd190
@ -2744,11 +2744,13 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||
_get_mouse_pos(Point2i(mp.x, mp.y), row, col);
|
||||
cursor_set_line(row, true);
|
||||
cursor_set_column(col);
|
||||
if (!scroll_past_end_of_file_enabled) {
|
||||
if (row <= get_first_visible_line()) {
|
||||
_scroll_lines_up();
|
||||
} else if (row >= get_last_full_visible_line()) {
|
||||
_scroll_lines_down();
|
||||
}
|
||||
}
|
||||
dragging_selection = true;
|
||||
update();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user