mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
The graph range used to be reset to default whenever all functions were modified. As we no longer want to reset the range without the user's input, we do not need to track whether the functions changed at all. /!\ As of this commit, there is no longer a way to restore the default zoom, until a new automatic zoom button is added. Change-Id: Ie74e8fd61e13055fa6ce2b2d1e883182d4ecffce
41 lines
1010 B
C++
41 lines
1010 B
C++
#include "function_app.h"
|
|
|
|
using namespace Poincare;
|
|
|
|
namespace Shared {
|
|
|
|
FunctionApp::Snapshot::Snapshot() :
|
|
m_cursor(),
|
|
m_indexFunctionSelectedByCursor(0),
|
|
m_rangeVersion(0),
|
|
m_angleUnitVersion(Preferences::AngleUnit::Radian)
|
|
{
|
|
}
|
|
|
|
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());
|
|
}
|
|
|
|
}
|