mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 11:39:58 +02:00
[apps] Probability: textfields should finish editing when the cursor is
on one edge of the field
This commit is contained in:
committed by
EmilieNumworks
parent
077a95197e
commit
2c85fe88a5
@@ -212,7 +212,9 @@ bool CalculationController::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
|
||||
bool CalculationController::textFieldShouldFinishEditing(TextField * textField, Ion::Events::Event event) {
|
||||
return (event == Ion::Events::Right && m_highlightedSubviewIndex < m_calculation->numberOfEditableParameters()) || event == Ion::Events::Left || TextFieldDelegate::textFieldShouldFinishEditing(textField, event);
|
||||
return TextFieldDelegate::textFieldShouldFinishEditing(textField, event)
|
||||
|| (event == Ion::Events::Right && textField->cursorLocation() == textField->draftTextLength() && m_highlightedSubviewIndex < m_calculation->numberOfEditableParameters())
|
||||
|| (event == Ion::Events::Left && textField->cursorLocation() == 0);
|
||||
}
|
||||
|
||||
bool CalculationController::textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) {
|
||||
|
||||
Reference in New Issue
Block a user