From ca5cc79f4464c5e9f34480757c288b9bbcb569ec Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 9 Jun 2022 21:16:31 +0200 Subject: [PATCH] Make it OK to re-examine content with subtitles. --- src/lib/string_text_file_content.cc | 2 ++ src/lib/text_content.cc | 7 +++++++ src/lib/text_content.h | 1 + 3 files changed, 10 insertions(+) diff --git a/src/lib/string_text_file_content.cc b/src/lib/string_text_file_content.cc index 934144fa4..95a282174 100644 --- a/src/lib/string_text_file_content.cc +++ b/src/lib/string_text_file_content.cc @@ -66,6 +66,8 @@ StringTextFileContent::examine (shared_ptr film, shared_ptr job Content::examine (film, job); StringTextFile file (shared_from_this()); + only_text()->clear_fonts(); + /* Default to turning these subtitles on */ only_text()->set_use (true); diff --git a/src/lib/text_content.cc b/src/lib/text_content.cc index 9c925cbcf..e91b7bcc0 100644 --- a/src/lib/text_content.cc +++ b/src/lib/text_content.cc @@ -664,3 +664,10 @@ TextContent::get_font(string id) const return *iter; } + +void +TextContent::clear_fonts() +{ + _fonts.clear(); +} + diff --git a/src/lib/text_content.h b/src/lib/text_content.h index f46b6c6d0..7ddb20b08 100644 --- a/src/lib/text_content.h +++ b/src/lib/text_content.h @@ -76,6 +76,7 @@ public: std::string identifier () const; void take_settings_from (std::shared_ptr c); + void clear_fonts (); void add_font (std::shared_ptr font); std::shared_ptr get_font(std::string id) const; -- 2.30.2