From 3423de5dc6e18491f79acf829727a1cee7325c4e Mon Sep 17 00:00:00 2001 From: niksedk Date: Wed, 1 Sep 2021 17:57:19 +0200 Subject: [PATCH] Fix waveform multiple select error - thx darbor87 :) Fix #5304 --- src/ui/Forms/Main.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index 749df3edb..90b17a91d 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -1002,9 +1002,12 @@ namespace Nikse.SubtitleEdit.Forms SubtitleListview1.SelectNone(); var end = Math.Max(start, idx); start = Math.Min(start, idx); - for (int i = start; i <= end; i++) + if (start >= 0) { - SubtitleListview1.Items[i].Selected = true; + for (int i = start; i <= end; i++) + { + SubtitleListview1.Items[i].Selected = true; + } } }