Ensure the 'select_all' function selects all items
This commit is contained in:
parent
6f90b23702
commit
d66c7a2ac5
1 changed files with 4 additions and 3 deletions
|
@ -5304,6 +5304,8 @@ void RichTextLabel::selection_copy() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RichTextLabel::select_all() {
|
void RichTextLabel::select_all() {
|
||||||
|
_validate_line_caches();
|
||||||
|
|
||||||
if (!selection.enabled) {
|
if (!selection.enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -5316,13 +5318,12 @@ void RichTextLabel::select_all() {
|
||||||
if (it->type != ITEM_FRAME) {
|
if (it->type != ITEM_FRAME) {
|
||||||
if (!from_item) {
|
if (!from_item) {
|
||||||
from_item = it;
|
from_item = it;
|
||||||
} else {
|
|
||||||
to_item = it;
|
|
||||||
}
|
}
|
||||||
|
to_item = it;
|
||||||
}
|
}
|
||||||
it = _get_next_item(it, true);
|
it = _get_next_item(it, true);
|
||||||
}
|
}
|
||||||
if (!from_item || !to_item) {
|
if (!from_item) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue