[code] Fixed Script edition cursor bugs.

The scroll is now reloaded when text is inserted or a new line is
entered. When opening a script, the cursor moves to the end of the
script.

Change-Id: I027ea80db485916fc3fc962cfa9e032ca0bbc81e
This commit is contained in:
Léa Saviot
2017-11-10 15:55:32 +01:00
committed by Romain Goyet
parent 8668de21a1
commit 42e6435973
3 changed files with 6 additions and 1 deletions

View File

@@ -29,6 +29,10 @@ void EditorController::didBecomeFirstResponder() {
app()->setFirstResponder(&m_textArea);
}
void EditorController::viewWillAppear() {
m_textArea.moveCursor(strlen(m_textArea.text() - m_textArea.cursorLocation()));
}
void EditorController::viewDidDisappear() {
m_scriptParameterController->scriptContentEditionDidFinish();
}