From dccd30f73cf8a68bf6765cad533f7d6887dc2171 Mon Sep 17 00:00:00 2001 From: cam900 Date: Sat, 9 Apr 2022 00:42:27 +0900 Subject: [PATCH] Fix loop area view in sample editor --- src/gui/sampleEdit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index b976ab92f..18a91e290 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -605,7 +605,7 @@ void FurnaceGUI::drawSampleEdit() { ImU32 centerLineColor=ImAlphaBlendColors(bgColor,ImGui::GetColorU32(ImGuiCol_PlotLines,0.25)); for (int i=0; iloopStart>=0 && sample->loopStart<(int)sample->samples && j-samplePos>sample->loopStart) { + if (sample->loopStart>=0 && sample->loopStart<(int)sample->samples && ((j+samplePos)*sampleZoom)>sample->loopStart) { data[i*availX+j]=bgColorLoop; } else { data[i*availX+j]=bgColor; @@ -870,4 +870,4 @@ void FurnaceGUI::doRedoSample() { updateSampleTex=true; } }); -} \ No newline at end of file +}