High frequency load/save bugfix

Editing widgets hidden if freqman category is empty
Textentry now trims strings up to cursor
This commit is contained in:
furrtek 2017-06-23 00:13:13 +01:00
parent 08391bba4f
commit c922a56b6d
4 changed files with 43 additions and 12 deletions

View file

@ -100,7 +100,7 @@ TextEntryView::TextEntryView(
_str->erase(std::find_if(_str->rbegin(), _str->rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), _str->end());
_cursor_pos = _str->length();
_str->resize(_max_length, 0);
_str->reserve(_max_length);
add_children({
&text_input,
@ -108,6 +108,7 @@ TextEntryView::TextEntryView(
});
button_ok.on_select = [this, &nav](Button&) {
_str->substr(0, _cursor_pos);
if (on_changed)
on_changed(_str);
nav.pop();