[apps] An expression model names contains the extension

This commit is contained in:
Léa Saviot
2018-10-04 11:36:48 +02:00
committed by Émilie Feral
parent dd01a57ba4
commit 77f4a92787
2 changed files with 2 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ namespace Graph {
class StorageCartesianFunction : public Shared::StorageFunction {
public:
static const char * Extension() { return Poincare::GlobalContext::funcExtension; }
static StorageCartesianFunction EmptyModel() { return StorageCartesianFunction("function", KDColorRed); }
static StorageCartesianFunction EmptyModel() { return StorageCartesianFunction("function.func", KDColorRed); }
StorageCartesianFunction(const char * text = nullptr, KDColor color = KDColorBlack);
StorageCartesianFunction(Ion::Storage::Record record);
bool operator==(const StorageCartesianFunction & other) const { return record() == other.record(); }

View File

@@ -53,7 +53,7 @@ public:
T addEmptyModel() {
T newModel = T::EmptyModel();
// TODO: create the record data (color, isActive and expression)
Ion::Storage::sharedStorage()->createRecordWithExtension(newModel.name(), "func", nullptr, 0); //TODO
Ion::Storage::sharedStorage()->createRecordWithFullName(newModel.name(), nullptr, 0); //TODO
return newModel;
}
void removeModel(T f) {