From a2ff3d607aa8a7659dd2b3f02bcdd573fbc29f58 Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Sun, 15 May 2022 11:27:28 -0700 Subject: [PATCH] serializer: skip overwriting subtitle params Fixes #1934 --- app/node/project/serializer/serializer220403.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/node/project/serializer/serializer220403.cpp b/app/node/project/serializer/serializer220403.cpp index 5fb2ab4ab..5a0a39822 100644 --- a/app/node/project/serializer/serializer220403.cpp +++ b/app/node/project/serializer/serializer220403.cpp @@ -700,6 +700,14 @@ void ProjectSerializer220403::LoadImmediate(QXmlStreamReader *reader, Node *node NodeValue::Type data_type = node->GetInputDataType(input); + // HACK: SubtitleParams contain the actual subtitle data, so loading/replacing it will overwrite + // the valid subtitles. We hack around it by simply skipping loading subtitles, we'll see + // if this ends up being an issue in the future. + if (data_type == NodeValue::kSubtitleParams) { + reader->skipCurrentElement(); + return; + } + while (XMLReadNextStartElement(reader)) { if (reader->name() == QStringLiteral("standard")) { // Load standard value