From a24707c83275ca3cff6ffad56ebdc1ada48422a2 Mon Sep 17 00:00:00 2001 From: Klaus Rettinghaus Date: Fri, 31 Jan 2025 15:01:28 +0100 Subject: [PATCH] fix: find referenced zone and surface --- CHANGELOG.md | 2 +- src/findfunctor.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2ca9a3da8..5721639cfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ * Support for `verse@place` for lyrics above the staff * Support for MIDI octave displacement without `@oct.ges` (@brdvd) * Option `--lyric-height-factor` to increase the spacing of the lyrics -* Fix `symbolDef` losing `@xml:id`s with `--remove-ids` (@rettinghaus) +* Fix `surface`, `symbolDef`, and `zone` losing `@xml:id`s with `--remove-ids` (@rettinghaus) ## [4.5.0] – 2024-12-22 * Integration of tablature customization implementation diff --git a/src/findfunctor.cpp b/src/findfunctor.cpp index bff1db282a..7e585788cf 100644 --- a/src/findfunctor.cpp +++ b/src/findfunctor.cpp @@ -14,7 +14,9 @@ #include "object.h" #include "plistinterface.h" #include "score.h" +#include "surface.h" #include "symboldef.h" +#include "zone.h" namespace vrv { @@ -273,6 +275,12 @@ FunctorCode FindAllReferencedObjectsFunctor::VisitObject(Object *object) if (interface->GetNextLink()) m_elements->push_back(interface->GetNextLink()); if (interface->GetSameasLink()) m_elements->push_back(interface->GetSameasLink()); } + if (object->HasInterface(INTERFACE_FACSIMILE)) { + FacsimileInterface *interface = object->GetFacsimileInterface(); + assert(interface); + if (interface->GetSurface()) m_elements->push_back(interface->GetSurface()); + if (interface->GetZone()) m_elements->push_back(interface->GetZone()); + } if (object->HasInterface(INTERFACE_PLIST)) { PlistInterface *interface = object->GetPlistInterface(); assert(interface);