From d454299637a568a7eb5ad5cc41bafb9c9c904073 Mon Sep 17 00:00:00 2001 From: Fodor Benedek Date: Sun, 24 Nov 2024 11:12:32 +0100 Subject: [PATCH] selected slide logic fix on cue reorder --- lib/ui/cue/page.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ui/cue/page.dart b/lib/ui/cue/page.dart index 9565f37..80f82bd 100644 --- a/lib/ui/cue/page.dart +++ b/lib/ui/cue/page.dart @@ -93,6 +93,10 @@ class _CuePageState extends ConsumerState { reorderCueSlides(cue.requireValue, from, to); if (selectedSlideOrIsAdding == from) { selectedSlideOrIsAdding = to > from ? to - 1 : to; + } else if (selectedSlideOrIsAdding != null && + from <= selectedSlideOrIsAdding! && + to > selectedSlideOrIsAdding!) { + selectedSlideOrIsAdding = selectedSlideOrIsAdding! - 1; } }); },