[code] Fixed bug in console history copy-paste.

The ConsoleController also tried to copy-paste the edit textfield.

Change-Id: Ib1e8d003a9c4793c0666d489f4b4278759eff484
This commit is contained in:
Léa Saviot
2017-11-16 15:02:14 +01:00
committed by Romain Goyet
parent f2e2e93888
commit c8a5f4dbe2

View File

@@ -105,7 +105,7 @@ bool ConsoleController::handleEvent(Ion::Events::Event event) {
return true;
}
} else if (event == Ion::Events::OK || event == Ion::Events::EXE) {
if (m_consoleStore.numberOfLines() > 0) {
if (m_consoleStore.numberOfLines() > 0 && m_selectableTableView.selectedRow() < m_consoleStore.numberOfLines()) {
const char * text = m_consoleStore.lineAtIndex(m_selectableTableView.selectedRow()).text();
m_editCell.setEditing(true);
m_selectableTableView.selectCellAtLocation(0, m_consoleStore.numberOfLines());