From ba44a820d61bb923cb2192349360ad1e1efbe63f Mon Sep 17 00:00:00 2001 From: David Graeff Date: Sat, 20 Jan 2018 14:09:30 +0100 Subject: [PATCH] Use std::shared_ptr for GlScope::showNewData and call update(). DsoWidget is not responsible for this anymore. --- openhantek/src/glscope.cpp | 6 ++++-- openhantek/src/glscope.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/openhantek/src/glscope.cpp b/openhantek/src/glscope.cpp index 16212e9..e5990d1 100644 --- a/openhantek/src/glscope.cpp +++ b/openhantek/src/glscope.cpp @@ -220,7 +220,7 @@ void GlScope::initializeGL() { shaderCompileSuccess = true; } -void GlScope::showData(PPresult *data) { +void GlScope::showData(std::shared_ptr data) { if (!shaderCompileSuccess) return; makeCurrent(); // Remove too much entries @@ -233,8 +233,10 @@ void GlScope::showData(PPresult *data) { m_GraphHistory.splice(m_GraphHistory.begin(), m_GraphHistory, std::prev(m_GraphHistory.end())); // Add new entry - m_GraphHistory.front().writeData(data, m_program.get(), vertexLocation); + m_GraphHistory.front().writeData(data.get(), m_program.get(), vertexLocation); // doneCurrent(); + + update(); } void GlScope::markerUpdated() { diff --git a/openhantek/src/glscope.h b/openhantek/src/glscope.h index 2206344..3f8f2ca 100644 --- a/openhantek/src/glscope.h +++ b/openhantek/src/glscope.h @@ -39,7 +39,7 @@ class GlScope : public QOpenGLWidget { * Show new post processed data * @param data */ - void showData(PPresult* data); + void showData(std::shared_ptr data); void markerUpdated(); protected: -- libgit2 0.21.4