[apps/code] Do not change the responders in autoImportScript if sandbox

This fixes the following scenario: create a script that draws at
importation (for instance, add "squares()" at the end of squares.py) and
execute this script. The sandbox is displayed but events are handled by
the underneath text field, thus leading to the display of the variable
box and other bugs.
This commit is contained in:
Léa Saviot
2019-02-05 15:29:42 +01:00
committed by EmilieNumworks
parent 535dee8220
commit 4a8c0a6bd0

View File

@@ -386,7 +386,7 @@ void ConsoleController::autoImportScript(Script script, bool force) {
// Step 2 - Run the command
runAndPrintForCommand(command);
}
if (force) {
if (!sandboxIsDisplayed() && force) {
m_selectableTableView.reloadData();
m_selectableTableView.selectCellAtLocation(0, m_consoleStore.numberOfLines());
m_editCell.setEditing(true);