[code] Improved console command editing.

When the user scrolls the history, the draft command is not erased.
When pasting a previous command, the text is inserted at the cursor
location.

Change-Id: I1cd9645de74f34fad4ed0898203e05bd3352456a
This commit is contained in:
Léa Saviot
2017-11-07 17:31:44 +01:00
committed by Romain Goyet
parent 0d6cb75425
commit 2456c7eeba
5 changed files with 25 additions and 15 deletions

View File

@@ -50,7 +50,7 @@ bool MenuController::handleEvent(Ion::Events::Event event) {
footer()->setSelectedButton(0);
return true;
} else if (event == Ion::Events::Up) {
if (m_selectableTableView.selectedRow() < 0) {
if (footer()->selectedButton() == 0) {
footer()->setSelectedButton(-1);
m_selectableTableView.selectCellAtLocation(0, numberOfRows()-1);
app()->setFirstResponder(&m_selectableTableView);