Added members overview (2.1)

This commit is contained in:
Paulb23 2017-10-07 14:41:46 +01:00
parent 1a934a58e4
commit 8cc56c16cf
4 changed files with 72 additions and 2 deletions

View file

@ -3941,6 +3941,11 @@ int TextEdit::get_v_scroll() const {
}
void TextEdit::set_v_scroll(int p_scroll) {
if (!scroll_past_end_of_file_enabled) {
if (p_scroll + get_visible_rows() > get_line_count()) {
p_scroll = get_line_count() - get_visible_rows();
}
}
v_scroll->set_val(p_scroll);
cursor.line_ofs = p_scroll;
}
@ -3950,7 +3955,6 @@ int TextEdit::get_h_scroll() const {
return h_scroll->get_val();
}
void TextEdit::set_h_scroll(int p_scroll) {
h_scroll->set_val(p_scroll);
}