From b6f9eacb8156c449c434a1cae8fc83909f5891e6 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 20 Aug 2024 08:20:57 -0400 Subject: [PATCH] Paint slice points if available (#1161) Addresses #513 --- src-ui/app/edit-screen/components/MappingPane.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src-ui/app/edit-screen/components/MappingPane.cpp b/src-ui/app/edit-screen/components/MappingPane.cpp index 96bb5ec2..3a86c48e 100644 --- a/src-ui/app/edit-screen/components/MappingPane.cpp +++ b/src-ui/app/edit-screen/components/MappingPane.cpp @@ -2969,6 +2969,19 @@ void SampleWaveform::paint(juce::Graphics &g) getHeight()); } } + + if (samp->meta.n_slices > 0) + { + g.setColour(editor->themeColor(theme::ColorMap::grid_primary)); + for (int i = 0; i < samp->meta.n_slices; ++i) + { + auto sp = samp->meta.slice_start[i] * fac; + auto ep = samp->meta.slice_end[i] * fac; + g.drawVerticalLine(sp, 0, getHeight()); + g.drawVerticalLine(ep, 0, getHeight()); + } + } + g.setColour(juce::Colours::white); g.drawRect(r, 1); }