mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
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
40 lines
956 B
C++
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());
|
|
}
|
|
|
|
}
|