engine: timeline panel core edit commands migrate to the facade (part 1)

- new batch primitives: split_clips (link-preserving, single undo
  command), delete_clips (gap replace + optional ripple with explicit
  region support), ripple_delete_range, marker_add_ex with color
- razor/split-at-playhead, clip delete, ripple-to-point, track delete,
  and the non-dialog marker path now issue facade commands instead of
  the app's own undo command classes
- batch operations deliberately produce one undo command per user
  action (deleting twenty clips is one entry, not twenty); selection
  and transition removal stay UI-side as documented leftovers
This commit is contained in:
2026-07-20 13:17:07 +08:00
parent 0a25d43218
commit 2aa7eec016
8 changed files with 528 additions and 51 deletions
@@ -29,6 +29,7 @@
#include <QtMath>
#include "core.h"
#include "oakengine/timeline.h"
#include "timeline/timelineundogeneral.h"
#include "ui/icons/icons.h"
#include "widget/menu/menu.h"
@@ -159,9 +160,11 @@ void TrackViewItem::show_context_menu(const QPoint &p)
void TrackViewItem::delete_track()
{
emit about_to_delete_track(track_);
Core::instance()->undo_stack()->push(
new TimelineRemoveTrackCommand(track_),
tr("Deleted Track \"%1\"").arg(track_->get_label_or_name()));
// Through the liboakengine C ABI facade (one undoable command, same as
// the old TimelineRemoveTrackCommand push).
oakengine_sequence_remove_track(
reinterpret_cast<OakEngineSequence *>(track_->sequence()),
int(track_->type()), track_->index());
}
void TrackViewItem::delete_all_empty_tracks()