Commit Graph

11243 Commits

Author SHA1 Message Date
Léa Saviot
8554bbd8c8 [poincare/layout_cursor] Fix cursor position after adding square root
Scenario:
Go to the 'Calculation' app
Type 'sqrt(sqrt(i))', by pressing the square button twice and then the i button
Press OK
Scroll up, and press OK
Press left until the cursor is right before the i.
Press "sqrt" : the root is added, but the cursor jumped to the right of the i.
The cursor should have stayed on the left of the i.

Note: The behavior is correct when you type the entire expression straight away by doing the following:
Press "sqrt", "sqrt", "i"
Press "left", so the cursor is right before the i
Press "sqrt" again. At this point, the cursor remains on the left of i.
2020-02-12 15:13:22 +01:00
Émilie Feral
bbe39aac14 [apps/calculation] HistoryController: display additional results pop-up
when handling OK/exe on the ellipsis view
2020-02-12 15:13:22 +01:00
Émilie Feral
7d0a1cd0b2 [apps/calculation] HistoryViewCell: enable selecting the ellipsis 2020-02-12 15:13:22 +01:00
Émilie Feral
9a97fc01b2 [apps/calculation] HistoryViewCell: m_expandedCalculation memoizes true
only when the calculation is actually expanded (when the output is
selected and the display output is ExactApproximateToggle)

This avoid blinking when changing input/output selection
2020-02-12 15:13:22 +01:00
Émilie Feral
f276a88e79 [apps/calculation] HistoryViewCell: display ellipsis view when
highlighted
2020-02-12 15:13:22 +01:00
Émilie Feral
b56cd8b012 [escher] Metric: add EllipsisCellWidth. This will be soon used by
Calculation::HistoryCell
2020-02-12 15:13:22 +01:00
Émilie Feral
251db5b60e [apps/shared][apps/calculation] Change class names:
ScrollableInputExactApproximateExpressionsCell -->
ScrollableThreeExpressionsCell
AbstractScrollableExactApproximateExpressionsView -->
AbstractScrollableMultipleExpressionsView
ScrollableExactApproximateExpressionsView -->
ScrollableTwoExpressionsView
ScrollableInputExactApproximateExpressionsView -->
ScrollableTwoExpressionsCell
2020-02-12 15:13:22 +01:00
Émilie Feral
87e4836196 [apps/calculation][apps/shared]
AbstractScrollableExactApproximateExpressionsView children classes
reload scroll after reloading the subview selection when entering the
responder chain and when cell becomes first responder. We don't reload
scroll when setting content of cells as this is done every time we
relayout - when scrolling in the table for instance.
2020-02-12 15:13:22 +01:00
Émilie Feral
ef5681ec0b [escher] Remove BurgerMenuView 2020-02-12 15:13:22 +01:00
Émilie Feral
56319ef275 [apps/shared] AbstractScrollableExactApproximateExpressionsView can hold up to
three expressions but no more BurgerMenuView.
ScrollableExactApproximateExpressionsView and
ScrollableInputExactApproximateExpressionsView inherit from it.
2020-02-12 15:13:22 +01:00
Émilie Feral
3de0ee7f98 [apps/calculation] ExpressionWithEqualSignView inherits from
ExpressionView instead of composing

This is useful for future change on
ScrollableExactApproximateExpressionView
2020-02-12 15:13:22 +01:00
Léa Saviot
88ab0e686c [apps] Less operations in willExitResponderChain if exiting app
If nextFirstResponder is nullptr, it means we are exiting the app, so
there is no need to relayout, reselect, ...
We did it bbefore because a long time ago, we used to keep all apps side
by side so they had to be thouroughly cleaned when exiting
2020-02-12 15:13:22 +01:00
Léa Saviot
90e5a08d3a [escher/app] Coding style 2020-02-12 15:13:22 +01:00
Léa Saviot
5e45a60f99 [apps/settings] Fix selection glitch
Scenario: Go to the Result format submenu of Settings. Modify the
significant figures with a wrong value (for instance, "7::"), press OK
then 0 -> he first row is selected, as well as the last row
2020-02-12 15:13:22 +01:00
Léa Saviot
19435687d5 [apps/settings] Coding style 2020-02-12 15:13:22 +01:00
Léa Saviot
60706835e7 [poincare/tree_node] Assertions on parent id that should not be this id 2020-02-12 15:13:22 +01:00
Léa Saviot
b7e177865a [apps/code] Fix prompt after input 2020-02-12 15:13:22 +01:00
Léa Saviot
3dcb40b5d4 [apps/code] Do not call interrupt in printText 2020-02-12 15:13:22 +01:00
Léa Saviot
1dacd71acb [apps/code] Remove unneeded arguments 2020-02-12 15:13:22 +01:00
Léa Saviot
c6c3e3f340 [apps/code] Hide prompt when running script 2020-02-12 15:13:22 +01:00
Léa Saviot
f47f1f0543 [apps/code] Refresh view in printText 2020-02-12 15:13:22 +01:00
Léa Saviot
f20bb1fcf2 [apps/code] Display the console before running auto-imported script 2020-02-12 15:13:22 +01:00
Léa Saviot
42bdf29ead [python] Fix compilation warnings 2020-02-12 15:13:22 +01:00
Léa Saviot
a5bf4b68fa [apps/code] Remove duplicate i18n 2020-02-12 15:13:22 +01:00
Léa Saviot
d5a18fcf13 [apps/code] Add time module in the toolbox 2020-02-12 15:13:22 +01:00
Léa Saviot
200e542a96 [apps/code] Add ion module in toolbox 2020-02-12 15:13:22 +01:00
Léa Saviot
8742ea9d25 [apps/code/i18N] Alphabetical rearrangement 2020-02-12 15:13:22 +01:00
Émilie Feral
373409b50e [apps/regression] Fix test compilation 2020-02-12 15:13:22 +01:00
Émilie Feral
60048cb9a9 [poincare] Create a ContextWithParent that implements expressionTypeForIdentifier 2020-02-12 15:13:22 +01:00
Émilie Feral
c629cb66ba [apps/calculation] Calculation: don't memoize the display in height
computation. It has to be updated everytime an exception is raised and
this was forgotten.
2020-02-12 15:13:22 +01:00
Émilie Feral
4e948ce533 [poincare] Change Factor approximation to return undef on non real
values
2020-02-12 15:13:22 +01:00
Émilie Feral
8deb81b8c2 [apps/calculation] CalculationStore: Equal and Store node are always at
the root, no need to recursively check their presence
2020-02-12 15:13:22 +01:00
Émilie Feral
0c19b54365 [apps/calculation] Do not display additional results for Equal or Store
expressions
2020-02-12 15:13:22 +01:00
Émilie Feral
2a37fa4447 [apps/calculation] ComplexListController: change the way the
Complex model parameters are computed.

Sometimes, approximation without simplification doesn't not give the
same results as approximation after simplification. As we decided to
display the additional results from an approximation without
simplifcation (done in Expression::hasDefinedComplexApproximation), we
compute the model parameters the same way (to ensure that both
parameters are defined)
2020-02-12 15:13:21 +01:00
Émilie Feral
58a4dcf62a [poincare] Multiplication: improve splitIntoNormalForm to fill Numeral
factor (instead of returning uninitialized factors) if the multiplication is 1x1
2020-02-12 15:13:21 +01:00
Émilie Feral
8d7eebbf0e [apps/calculation] Calculation: fix variable confusion 2020-02-12 15:13:21 +01:00
Léa Saviot
f0ca8296bf [poincare/function] f(1/0) = undef when f(x) = 3 2020-02-12 15:13:21 +01:00
Léa Saviot
167fdf285f [poincare/test] Simplification test on f(1/0) when f(x) = 3 2020-02-12 15:13:21 +01:00
Léa Saviot
a3a1f86f8d [apps] Add context parameter to fix tests 2020-02-12 15:13:21 +01:00
Léa Saviot
78adca7113 [poincare/tests] Fix tests after parsing change 2020-02-12 15:13:21 +01:00
Léa Saviot
9d6bab092f [poincare/parser] Identifier is not already function -> symbol
We check the context: if an identifier is already a function, we
interpret it as such, otherwise it is a symbol.
This way, in the Equation app, x(x+1) is interpreted as x*(x+1)
2020-02-12 15:13:21 +01:00
Léa Saviot
756eeeb2d8 [poincare/parser] Add context 2020-02-12 15:13:21 +01:00
Émilie Feral
158a45e94d [apps/shared] AbstractScrollableExactApproximateExpressionsView: let the
child class decides which subview to select
2020-02-12 15:13:21 +01:00
Émilie Feral
3d3189d0dd [escher] BurgerMenuView: when drawRect, reinitialize the rectangle to
avoid corruption when re-drawing above a burger. Indeed,
blendRectWithMask pulls the current color to blend it.
2020-02-12 15:13:21 +01:00
Émilie Feral
764277fbb8 [escher] BurgerMenuView: fix masks 2020-02-12 15:13:21 +01:00
Émilie Feral
d61336936e [apps/shared] Create a class Dots to share dots masks between CurveView
and RoundCursorView. Use the same dot for illustrations of additional
results in Calculation app and Function app
2020-02-12 15:13:21 +01:00
Émilie Feral
ba159de21d [apps/calculation] Trigonometry additional results are displayed if the
input OR the output is a cosine/sine
2020-02-12 15:13:21 +01:00
Émilie Feral
f5523fe01c [apps] Slightly change the message of Empty variable box to avoid text
cropping
2020-02-12 15:13:21 +01:00
Émilie Feral
60cac1f928 [apps] Add borders to VariableBoxEmptyController 2020-02-12 15:13:21 +01:00
Émilie Feral
581756b046 [escher] Fix Bordered::drawInnerRect 2020-02-12 15:13:21 +01:00