mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 07:40:42 +01:00
[escher] EditableExpressionView handles Paste events.
Change-Id: Ie23fe49a4b300592ffb77c5548305d1c50279dd1
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <escher/editable_expression_view.h>
|
||||
#include <escher/clipboard.h>
|
||||
#include <escher/text_field.h>
|
||||
#include <poincare/src/layout/matrix_layout.h>
|
||||
#include <assert.h>
|
||||
@@ -161,6 +162,13 @@ bool EditableExpressionView::privateHandleEvent(Ion::Events::Event event) {
|
||||
m_expressionViewWithCursor.cursor()->performBackspace();
|
||||
return true;
|
||||
}
|
||||
if (event == Ion::Events::Paste) {
|
||||
if (!isEditing()) {
|
||||
setEditing(true);
|
||||
}
|
||||
insertLayoutFromTextAtCursor(Clipboard::sharedClipboard()->storedText());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user