From 60fd44163ed3d51a297d17a07d2573d7c3741384 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 23 May 2014 07:09:32 -0700 Subject: [PATCH] Don't clear project properties on undo/redo --- src/subs_controller.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/subs_controller.cpp b/src/subs_controller.cpp index 1491bde06..5f0a80f0f 100644 --- a/src/subs_controller.cpp +++ b/src/subs_controller.cpp @@ -84,9 +84,14 @@ struct SubsController::UndoInfo { } void Apply(agi::Context *c) const { - // Keep old lines alive until after the commit is complete + // Keep old dialogue lines alive until after the commit is complete + // since a bunch of stuff holds references to them AssFile old; - old.swap(*c->ass); + old.Events.swap(c->ass->Events); + c->ass->Info.clear(); + c->ass->Attachments.clear(); + c->ass->Styles.clear(); + c->ass->Extradata.clear(); sort(begin(selection), end(selection));