From c9e9431fb8c8876ab9aa142a0b0aed7fe5537c40 Mon Sep 17 00:00:00 2001 From: Ivan Gagis Date: Wed, 14 Aug 2024 11:18:28 +0300 Subject: [PATCH] small fix to waveform drawing --- .vscode/launch.json | 4 ++-- src/bedsidemon/waveform.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index aa812d2..5f397db 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,8 +8,8 @@ "name": "(gdb) app", "type": "cppdbg", "request": "launch", - "program": "${workspaceFolder}/out/dbg/bedsidemon", - "args": [], + "program": "${workspaceFolder}/src/out/dbg/bedsidemon-opengles-xorg", + "args": ["--window", "--res-path=res"], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], diff --git a/src/bedsidemon/waveform.cpp b/src/bedsidemon/waveform.cpp index 98fbd81..de1ec91 100644 --- a/src/bedsidemon/waveform.cpp +++ b/src/bedsidemon/waveform.cpp @@ -156,6 +156,7 @@ void waveform::push(ruis::real value, ruis::real dt_ms) auto& pop_path = [&]() -> path& { if (pop_pos >= this->rect().d.x()) { pop_pos -= this->rect().d.x(); + this->paths[1].points.clear(); return this->paths[0]; } return this->paths[1];