summaryrefslogtreecommitdiff
path: root/src/lib/check_content_job.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-06-09 22:40:02 +0200
committerCarl Hetherington <cth@carlh.net>2022-06-10 23:12:24 +0200
commit14e02ad2f79bdc6fbc320ec7b9282b5faabdb825 (patch)
treecfc09ceb9c3298e48eab0ce1b5c8d940a895ec04 /src/lib/check_content_job.cc
parente68386830c8812f80cb4b3af9871170226b916b4 (diff)
Fix problems when loading old projects with the new subtitle font code (#2271).
Diffstat (limited to 'src/lib/check_content_job.cc')
-rw-r--r--src/lib/check_content_job.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/check_content_job.cc b/src/lib/check_content_job.cc
index a789ed9e0..2b6e25da8 100644
--- a/src/lib/check_content_job.cc
+++ b/src/lib/check_content_job.cc
@@ -24,12 +24,14 @@
#include "examine_content_job.h"
#include "film.h"
#include "job_manager.h"
+#include "string_text_file_content.h"
#include <iostream>
#include "i18n.h"
using std::cout;
+using std::dynamic_pointer_cast;
using std::make_shared;
using std::shared_ptr;
using std::string;
@@ -74,6 +76,14 @@ CheckContentJob::run ()
set_message (_("Some files have been changed since they were added to the project.\n\nThese files will now be re-examined, so you may need to check their settings."));
}
+ if (_film->last_written_by_earlier_than(2, 16, 14)) {
+ for (auto c: content) {
+ if (auto stf = dynamic_pointer_cast<StringTextFileContent>(c)) {
+ stf->check_font_ids();
+ }
+ }
+ }
+
set_progress (1);
set_state (FINISHED_OK);
}