From bdc29455cc28e456a0a859f5542e25486ab49b89 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sun, 20 Mar 2022 05:19:23 -0500 Subject: [PATCH] GUI: one more change to the status bar --- src/gui/sampleEdit.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index a59a043e7..f63080cf3 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -354,7 +354,14 @@ void FurnaceGUI::drawSampleEdit() { if (!sampleDragMode) { if (sampleSelStart>=0 && sampleSelEnd>=0) { - statusBar+=fmt::sprintf(" (%d-%d)",sampleSelStart,sampleSelEnd); + int start=sampleSelStart; + int end=sampleSelEnd; + if (start>end) { + start^=end; + end^=start; + start^=end; + } + statusBar+=fmt::sprintf(" (%d-%d)",start,end); } }