mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
The Equal sign now triggers a syntax error in all apps but Solver. This make its behaviour symmetrical with that of < and >. Change-Id: Ia886c547a315d5627a69f3f2acac2cbce0e202c2
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
#include "function_app.h"
|
|
|
|
using namespace Poincare;
|
|
|
|
namespace Shared {
|
|
|
|
FunctionApp::Snapshot::Snapshot() :
|
|
m_cursor(),
|
|
m_indexFunctionSelectedByCursor(0),
|
|
m_modelVersion(0),
|
|
m_rangeVersion(0),
|
|
m_angleUnitVersion(Preferences::AngleUnit::Radian)
|
|
{
|
|
assert(m_previousModelsVersions[0] == 0);
|
|
}
|
|
|
|
void FunctionApp::Snapshot::reset() {
|
|
m_indexFunctionSelectedByCursor = 0;
|
|
m_modelVersion = 0;
|
|
assert(sizeof(m_previousModelsVersions) == sizeof(uint32_t) * FunctionGraphController::sNumberOfMemoizedModelVersions);
|
|
memset(m_previousModelsVersions, 0, sizeof(m_previousModelsVersions));
|
|
m_rangeVersion = 0;
|
|
setActiveTab(0);
|
|
}
|
|
|
|
void FunctionApp::Snapshot::storageDidChangeForRecord(const Ion::Storage::Record record) {
|
|
functionStore()->storageDidChangeForRecord(record);
|
|
}
|
|
|
|
void FunctionApp::willBecomeInactive() {
|
|
if (m_modalViewController.isDisplayingModal()) {
|
|
m_modalViewController.dismissModalViewController(true);
|
|
}
|
|
if (inputViewController()->isDisplayingModal()) {
|
|
inputViewController()->abortEditionAndDismiss();
|
|
}
|
|
::App::willBecomeInactive();
|
|
}
|
|
|
|
|
|
bool FunctionApp::isAcceptableExpression(const Expression exp) {
|
|
return TextFieldDelegateApp::isAcceptableExpression(exp) && ExpressionCanBeSerialized(exp, false, Expression(), localContext());
|
|
}
|
|
|
|
}
|