diff --git a/include/dashboardsk.h b/include/dashboardsk.h index 057e7a2..13af816 100644 --- a/include/dashboardsk.h +++ b/include/dashboardsk.h @@ -424,6 +424,10 @@ class DashboardSK { /// Check if the dashboard is visible /// @return true if visible bool IsVisible(); + + /// Process data without drawing anything + /// Serves primarily to update instruments with history + void ProcessData(); }; PLUGIN_END_NAMESPACE diff --git a/src/dashboardsk.cpp b/src/dashboardsk.cpp index 0edc64f..b6d03e5 100644 --- a/src/dashboardsk.cpp +++ b/src/dashboardsk.cpp @@ -44,6 +44,13 @@ DashboardSK::DashboardSK(const wxString& data_path) m_sk_data["vessels"].AddComment("Root of the vessel tree"); } +void DashboardSK::ProcessData() +{ + for (auto dashboard : m_dashboards) { + dashboard->ProcessData(); + } +} + void DashboardSK::Draw(dskDC* dc, PlugIn_ViewPort* vp, int canvasIndex) { if (m_displayed_pages.find(canvasIndex) == m_displayed_pages.end()) { diff --git a/src/dashboardsk_pi.cpp b/src/dashboardsk_pi.cpp index 679498f..076baab 100644 --- a/src/dashboardsk_pi.cpp +++ b/src/dashboardsk_pi.cpp @@ -248,7 +248,14 @@ bool dashboardsk_pi::RenderGLOverlayMultiCanvas( // return false; } - if (!vp || !m_shown) { + if (!vp) { + return false; + } + + if (!m_shown) { + if (m_dsk) { + m_dsk->ProcessData(); + } return false; }