[code] Fixed table reload when executing one script.

Before, the history would not redraw itself properly when selecting
"Execute Script" from a script's options.

Change-Id: Ibefd920eb038165a81ddb464dbf889047ad1f370
This commit is contained in:
Léa Saviot
2017-12-04 13:51:38 +01:00
parent b27551ce4f
commit 56ac5071f2

View File

@@ -77,7 +77,6 @@ void ConsoleController::runAndPrintForCommand(const char * command) {
runCode(command);
flushOutputAccumulationBufferToStore();
m_consoleStore.deleteLastLineIfEmpty();
}
void ConsoleController::removeExtensionIfAny(char * name) {
@@ -318,6 +317,12 @@ void ConsoleController::autoImportScriptAtIndex(int index, bool force) {
memcpy(&command[lenImportCommand1 + scriptNewNameLength], importCommand2, lenImportCommand2 + 1);
runAndPrintForCommand(command);
}
if (force) {
m_selectableTableView.reloadData();
m_selectableTableView.selectCellAtLocation(0, m_consoleStore.numberOfLines());
m_editCell.setEditing(true);
m_editCell.setText("");
}
}
void ConsoleController::flushOutputAccumulationBufferToStore() {