Commit ba44a820d61bb923cb2192349360ad1e1efbe63f

Authored by David Graeff
Committed by David Gräff
1 parent 1c7190e7

Use std::shared_ptr for GlScope::showNewData and call update(). DsoWidget is not…

… responsible for this anymore.
openhantek/src/glscope.cpp
@@ -220,7 +220,7 @@ void GlScope::initializeGL() { @@ -220,7 +220,7 @@ void GlScope::initializeGL() {
220 shaderCompileSuccess = true; 220 shaderCompileSuccess = true;
221 } 221 }
222 222
223 -void GlScope::showData(PPresult *data) { 223 +void GlScope::showData(std::shared_ptr<PPresult> data) {
224 if (!shaderCompileSuccess) return; 224 if (!shaderCompileSuccess) return;
225 makeCurrent(); 225 makeCurrent();
226 // Remove too much entries 226 // Remove too much entries
@@ -233,8 +233,10 @@ void GlScope::showData(PPresult *data) { @@ -233,8 +233,10 @@ void GlScope::showData(PPresult *data) {
233 m_GraphHistory.splice(m_GraphHistory.begin(), m_GraphHistory, std::prev(m_GraphHistory.end())); 233 m_GraphHistory.splice(m_GraphHistory.begin(), m_GraphHistory, std::prev(m_GraphHistory.end()));
234 234
235 // Add new entry 235 // Add new entry
236 - m_GraphHistory.front().writeData(data, m_program.get(), vertexLocation); 236 + m_GraphHistory.front().writeData(data.get(), m_program.get(), vertexLocation);
237 // doneCurrent(); 237 // doneCurrent();
  238 +
  239 + update();
238 } 240 }
239 241
240 void GlScope::markerUpdated() { 242 void GlScope::markerUpdated() {
openhantek/src/glscope.h
@@ -39,7 +39,7 @@ class GlScope : public QOpenGLWidget { @@ -39,7 +39,7 @@ class GlScope : public QOpenGLWidget {
39 * Show new post processed data 39 * Show new post processed data
40 * @param data 40 * @param data
41 */ 41 */
42 - void showData(PPresult* data); 42 + void showData(std::shared_ptr<PPresult> data);
43 void markerUpdated(); 43 void markerUpdated();
44 44
45 protected: 45 protected: