From ca229134b3772952be812c10643f8f8157fa9df9 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 20 Jul 2023 07:32:51 +0400 Subject: [PATCH] editor: Reset selected bulk idx when starting insert camera line --- src/modules/tas_studio/editor/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/tas_studio/editor/mod.rs b/src/modules/tas_studio/editor/mod.rs index b001942..98b7abe 100644 --- a/src/modules/tas_studio/editor/mod.rs +++ b/src/modules/tas_studio/editor/mod.rs @@ -1192,6 +1192,10 @@ impl Editor { self.invalidate(hovered_frame_idx + 1); self.recompute_extra_camera_frame_data_if_needed(); + // Reset the selected bulk index as dragging the insert camera line adjustment + // around will split and rejoin frame bulks and generally mess with the index. + self.selected_bulk_idx = None; + self.insert_camera_line_adjustment = Some(InsertCameraLineAdjustment { mouse_adjustment: MouseAdjustment::new(0, mouse_pos, dir), starting_frame_idx: hovered_frame_idx,