Files
Upsilon/apps/shared/function_app.cpp
Gabriel Ozouf 56e03aae0c [shared] Remove angleUnitVersion
The angleUnitVersion check is no longer needed, as changing the angle
unit with a trigonometric function set would leave the cursor hanging.

Change-Id: I17d99c05daeacfec953865158cdfe7706635cd32
2020-11-24 09:55:22 +01:00

40 lines
956 B
C++

#include "function_app.h"
using namespace Poincare;
namespace Shared {
FunctionApp::Snapshot::Snapshot() :
m_cursor(),
m_indexFunctionSelectedByCursor(0),
m_rangeVersion(0)
{
}
void FunctionApp::Snapshot::reset() {
m_indexFunctionSelectedByCursor = 0;
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());
}
}