diff --git a/apps/apps_container.cpp b/apps/apps_container.cpp index 3764c6ef0..0dc16573d 100644 --- a/apps/apps_container.cpp +++ b/apps/apps_container.cpp @@ -95,8 +95,8 @@ App::Snapshot * AppsContainer::usbConnectedAppSnapshot() { } void AppsContainer::reset() { - // Empty stored variable - Ion::Storage::sharedStorage()->destroyRecordsWithExtension("exp"); + // Empty storage (delete functions, variables, python scripts) + Ion::Storage::sharedStorage()->destroyAllRecords(); // Empty clipboard Clipboard::sharedClipboard()->reset(); for (int i = 0; i < numberOfApps(); i++) { diff --git a/apps/code/app.cpp b/apps/code/app.cpp index bccf11716..efc7e6a94 100644 --- a/apps/code/app.cpp +++ b/apps/code/app.cpp @@ -30,10 +30,6 @@ App * App::Snapshot::unpack(Container * container) { return new (container->currentAppBuffer()) App(container, this); } -void App::Snapshot::reset() { - m_scriptStore.deleteAllScripts(); -} - App::Descriptor * App::Snapshot::descriptor() { static Descriptor descriptor; return &descriptor; diff --git a/apps/code/app.h b/apps/code/app.h index bcb45c3ee..58d007e3c 100644 --- a/apps/code/app.h +++ b/apps/code/app.h @@ -24,7 +24,6 @@ public: public: Snapshot(); App * unpack(Container * container) override; - void reset() override; Descriptor * descriptor() override; ScriptStore * scriptStore(); #if EPSILON_GETOPT diff --git a/apps/graph/app.cpp b/apps/graph/app.cpp index cb5f22e1d..9f0bf27d1 100644 --- a/apps/graph/app.cpp +++ b/apps/graph/app.cpp @@ -33,7 +33,6 @@ App * App::Snapshot::unpack(Container * container) { void App::Snapshot::reset() { StorageFunctionApp::Snapshot::reset(); - m_functionStore.removeAll(); m_graphRange.setDefault(); }