Add Select All functionality, closes #19

This commit is contained in:
Twan van Laarhoven
2020-05-08 01:54:51 +02:00
parent 8b25815f72
commit 2d171732a0
21 changed files with 291 additions and 209 deletions
+9
View File
@@ -1165,6 +1165,15 @@ bool TextValueEditor::isWordBoundary(size_t pos_i) const {
}
}
void TextValueEditor::doSelectAll() {
size_t old_selection_start_i = selection_start_i;
size_t old_selection_end_i = selection_end_i;
selection_start_i = 0;
selection_end_i = value().value().size();
fixSelection(TYPE_INDEX);
redrawSelection(old_selection_start_i, old_selection_end_i, dropDownShown());
}
void TextValueEditor::select(size_t start, size_t end) {
selection_start = start;
selection_end = end;