Split works on every selected frame

Split (menu and shortcut) splits each selected frame that spans the time
under the cursor or playhead; triggers are skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-06 00:51:48 -04:00
1 parent f4fd255a02
commit 94d0bbf206
5 files changed
+33 -4

No files matched your search

+3 -3
View File
@@ -115,10 +115,10 @@ namespace anm2ed::imgui
void TimelineContext::frame_split()
{
auto selectedFrames = document.frame_references_get(Document::FrameReferenceFallback::NONE);
if (selectedFrames.size() != 1) return;
auto targetReference = *selectedFrames.begin();
std::erase_if(selectedFrames, is_trigger_reference);
if (selectedFrames.empty()) return;
auto time = frameSplitTimeAtCursor.value_or((int)std::floor(playback.time));
edit_push(EDIT_SPLIT_FRAME, [=](model::Model& model) { return edit::frame_split(model, targetReference, time); });
edit_push(EDIT_SPLIT_FRAME, [=](model::Model& model) { return edit::frames_split(model, selectedFrames, time); });
}
void TimelineContext::item_remove()