mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/math_toolbox] Handle const char * when selecting a leaf.
Else, there would be a problem with sequence_toolbox, where not all toolbox leaves are message trees. Change-Id: Ib4968aad37f6a835b1ea4d77efac2ae1bd19c7ce
This commit is contained in:
@@ -128,13 +128,13 @@ void VariableBoxController::ContentViewController::insertTextInCaller(const char
|
||||
}
|
||||
int previousCursorLocation = m_textFieldCaller->cursorLocation();
|
||||
m_textFieldCaller->insertTextAtLocation(commandBuffer, previousCursorLocation);
|
||||
m_textFieldCaller->setCursorLocation(previousCursorLocation + Shared::ToolboxHelpers::CursorIndexInCommand(commandBuffer));
|
||||
m_textFieldCaller->setCursorLocation(previousCursorLocation + Shared::ToolboxHelpers::CursorIndexInCommandText(commandBuffer));
|
||||
return;
|
||||
}
|
||||
if (m_textAreaCaller != nullptr) {
|
||||
int previousCursorLocation = m_textAreaCaller->cursorLocation();
|
||||
m_textAreaCaller->insertText(commandBuffer);
|
||||
int deltaCursorLocation = - m_textAreaCaller->cursorLocation() + previousCursorLocation + Shared::ToolboxHelpers::CursorIndexInCommand(commandBuffer);
|
||||
int deltaCursorLocation = - m_textAreaCaller->cursorLocation() + previousCursorLocation + Shared::ToolboxHelpers::CursorIndexInCommandText(commandBuffer);
|
||||
m_textAreaCaller->moveCursor(deltaCursorLocation);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user