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
When closing and reopening Calculation, if the cursor was on an
EmptyLayout, this layout would be invisible, instead of being denoted by
its usual yellow square.
This also fixes a bug that would leave the grey squares in matrices when
leaving and reopening the app, causing a failed assertion on the simulator.
Change-Id: Ib723797c079f1441f5cde174aa5c492ad4226335
Closing the Calculation app because of a full pool would crash the
device, by attempting to dump a layout with no node.
Change-Id: Ic926da61ae93f47eb576848788e1de5e3f94f5bb
Added some methods to manipulate the layout of a LayoutField from an
ExpressionField, like storing into and restoring from a buffer.
Change-Id: I7b7b5b53626f19237a5215bd196e897a518e9577
Such changes used to be detected only when the height was equal to the
maximal allowed value, by detecting whether the height shifted from or
to that maximal value. For that purpose, a boolean was memoized in
InputViewController and in Calculation::EditExpressionController.
- when textFieldDidFinishEditing failed ("1+ln(-2)" in a scalar
entry for instance), the previous text was modified even if edition aborted
- The draft buffer was not reinitialized when overriding the draft text
buffer with a text event
avoid erasing text that is required later.
Fix bug: OK handling on function list in linear mode did not copy the
function expression into the textfield before editing
Since commit
[escher] Implement ScrollView::minimalSizeForOptimalDisplay including margins
minimalSizeForOptimalDisplay includes the ScrollView margins.
Class hierarchy:
- InputEventHandler
- TextInput
- EditableField derives from InputEventHandler
- LayoutField, TextField and ExpressioField derives from EditableField
- TextArea and TextField derives from TextInput
This makes the code in the various toolbox more generic. The arguments
of the text to insert are each replaced by a Ion::Charset::Empty.
These Empty chars are used to create layouts in ExpressionLayoutFields,
and to compute the position of the cursor in other fields, before being
removed.
Change-Id: Ie81c1e394b06fef2ab801ccff919d6550f70ec30