diff --git a/python/port/mod/matplotlib/plot_controller.cpp b/python/port/mod/matplotlib/plot_controller.cpp index e69de29bb..fabb0eac9 100644 --- a/python/port/mod/matplotlib/plot_controller.cpp +++ b/python/port/mod/matplotlib/plot_controller.cpp @@ -0,0 +1,10 @@ +#include "plot_controller.h" + +namespace Matplotlib { + +void PlotController::viewDidDisappear() { + MicroPython::ExecutionViewControllerHelper::viewDidDisappear(this); + m_store->flush(); +} + +} diff --git a/python/port/mod/matplotlib/plot_controller.h b/python/port/mod/matplotlib/plot_controller.h index eba046b24..88dc9d213 100644 --- a/python/port/mod/matplotlib/plot_controller.h +++ b/python/port/mod/matplotlib/plot_controller.h @@ -13,7 +13,7 @@ public: PlotController(PlotStore * store, MicroPython::ExecutionEnvironment * executiveEnvironment) : Shared::ZoomAndPanCurveViewController(nullptr), ExecutionViewControllerHelper(executiveEnvironment), m_store(store), m_view(m_store) {} void viewWillAppear() override { MicroPython::ExecutionViewControllerHelper::viewWillAppear(this); } - void viewDidDisappear() override { MicroPython::ExecutionViewControllerHelper::viewDidDisappear(this); } + void viewDidDisappear() override; protected: Shared::CurveView * curveView() override { return &m_view; }