[escher/expression_field] Renamed dumpLayout

Changed dumpLayout's name to moveCursorAndDumpContent, as the name
suggested the method was only usable on layouts (while it also works on
text). The method is also no longer marked const, and the previous name
could imply that it had no side effects.
Likewise, renamed restoreLayout to restoreContent.

Change-Id: I46b320e74c07b48e256dc2146f9ecc15af38a8e6
This commit is contained in:
Gabriel Ozouf
2020-07-08 11:23:51 +02:00
committed by Émilie Feral
parent 67af3a5b4e
commit de681705e6
3 changed files with 14 additions and 13 deletions

View File

@@ -56,13 +56,13 @@ void EditExpressionController::insertTextBody(const char * text) {
void EditExpressionController::didBecomeFirstResponder() {
m_contentView.mainView()->scrollToBottom();
m_contentView.expressionField()->setEditing(true, false);
m_contentView.expressionField()->restoreLayout(m_cacheBuffer, *m_cacheBufferInformation);
m_contentView.expressionField()->restoreContent(m_cacheBuffer, *m_cacheBufferInformation);
clearCacheBuffer();
Container::activeApp()->setFirstResponder(m_contentView.expressionField());
}
void EditExpressionController::willExitResponderChain(Responder * nextFirstResponder) {
*m_cacheBufferInformation = m_contentView.expressionField()->dumpLayout(m_cacheBuffer, k_cacheBufferSize);
*m_cacheBufferInformation = m_contentView.expressionField()->moveCursorAndDumpContent(m_cacheBuffer, k_cacheBufferSize);
::ViewController::willExitResponderChain(nextFirstResponder);
}