Don't clear project properties on undo/redo

This commit is contained in:
Thomas Goyne 2014-05-23 07:09:32 -07:00
parent 40ac2f9b44
commit 60fd44163e

View file

@ -84,9 +84,14 @@ struct SubsController::UndoInfo {
} }
void Apply(agi::Context *c) const { 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; 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)); sort(begin(selection), end(selection));