summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-08-27 00:17:58 +0200
committerCarl Hetherington <cth@carlh.net>2023-08-27 00:17:58 +0200
commit6e49be4baede66ce5f89c45fffafb6bdfff95401 (patch)
treecbadf655da758e69ee5fabb49d3ed15bc458c17f /src/lib
parentee0908336e86d7b92f421fdd10f0334d76fa4c11 (diff)
Fix refusal to reference overlapping but different text content (#2599).
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dcp_content.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index 928ba3381..770e5bfad 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -787,8 +787,8 @@ DCPContent::can_reference_text (shared_ptr<const Film> film, TextType type, stri
/// TRANSLATORS: this string will follow "Cannot reference this DCP: "
return can_reference(
film,
- [](shared_ptr<const Content> c) {
- return !c->text.empty();
+ [type](shared_ptr<const Content> c) {
+ return std::find_if(c->text.begin(), c->text.end(), [type](shared_ptr<const TextContent> t) { return t->type() == type; }) != c->text.end();
},
_("they overlap other text content; remove the other content."),
why_not