Skip to content

Commit ba44a82

Browse files
author
David Graeff
committed
Use std::shared_ptr for GlScope::showNewData and call update(). DsoWidget is not responsible for this anymore.
1 parent 1c7190e commit ba44a82

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

openhantek/src/glscope.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void GlScope::initializeGL() {
220220
shaderCompileSuccess = true;
221221
}
222222

223-
void GlScope::showData(PPresult *data) {
223+
void GlScope::showData(std::shared_ptr<PPresult> data) {
224224
if (!shaderCompileSuccess) return;
225225
makeCurrent();
226226
// Remove too much entries
@@ -233,8 +233,10 @@ void GlScope::showData(PPresult *data) {
233233
m_GraphHistory.splice(m_GraphHistory.begin(), m_GraphHistory, std::prev(m_GraphHistory.end()));
234234

235235
// Add new entry
236-
m_GraphHistory.front().writeData(data, m_program.get(), vertexLocation);
236+
m_GraphHistory.front().writeData(data.get(), m_program.get(), vertexLocation);
237237
// doneCurrent();
238+
239+
update();
238240
}
239241

240242
void GlScope::markerUpdated() {

openhantek/src/glscope.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class GlScope : public QOpenGLWidget {
3939
* Show new post processed data
4040
* @param data
4141
*/
42-
void showData(PPresult* data);
42+
void showData(std::shared_ptr<PPresult> data);
4343
void markerUpdated();
4444

4545
protected:

0 commit comments

Comments
 (0)