mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-25 16:50:50 +01:00
[expression_editor] Insert an empty matrix when adding a bracket.
Change-Id: I5bf6ab9e097637e0e49f0941fe02e4f5a8e373a2
This commit is contained in:
@@ -130,9 +130,14 @@ ExpressionLayout * Controller::handleAddEvent(Ion::Events::Event event) {
|
||||
}
|
||||
if (event.hasText()) {
|
||||
const char * textToInsert = event.text();
|
||||
if (textToInsert[0] == Ion::Charset::MultiplicationSign && textToInsert[1] == 0) {
|
||||
const char middleDotString[] = {Ion::Charset::MiddleDot, 0};
|
||||
return m_cursor.insertText(middleDotString);
|
||||
if (textToInsert[1] == 0) {
|
||||
if (textToInsert[0] == Ion::Charset::MultiplicationSign) {
|
||||
const char middleDotString[] = {Ion::Charset::MiddleDot, 0};
|
||||
return m_cursor.insertText(middleDotString);
|
||||
}
|
||||
if (textToInsert[0] == '[' || textToInsert[0] == ']') {
|
||||
return m_cursor.addEmptyMatrixLayout();
|
||||
}
|
||||
}
|
||||
return m_cursor.insertText(textToInsert);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user