From c0406d67f18872128a3d2b99c33af9128573de10 Mon Sep 17 00:00:00 2001 From: Yinan Zhou Date: Mon, 22 Jan 2024 16:26:49 -0500 Subject: [PATCH] Remove unused code in layerelement --- src/layerelement.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/layerelement.cpp b/src/layerelement.cpp index 459d4c505df..4d9b2dbadc9 100644 --- a/src/layerelement.cpp +++ b/src/layerelement.cpp @@ -396,15 +396,6 @@ void LayerElement::SetGraceAlignment(Alignment *graceAlignment) int LayerElement::GetDrawingX() const { - // If this element has a facsimile and we are in facsimile mode, use Facsimile::GetDrawingX - if (this->HasFacs()) { - const Doc *doc = vrv_cast(this->GetFirstAncestor(DOC)); - assert(doc); - if (doc->IsFacs()) { - return FacsimileInterface::GetDrawingX(); - } - } - // Since m_drawingFacsX is the left position, we adjust the XRel accordingly in AdjustXRelForTranscription if (m_drawingFacsX != VRV_UNSET) return m_drawingFacsX + this->GetDrawingXRel(); @@ -444,14 +435,7 @@ int LayerElement::GetDrawingX() const int LayerElement::GetDrawingY() const { - // If this element has a facsimile and we are in facsimile mode, use Facsimile::GetDrawingY - if (this->HasFacs()) { - const Doc *doc = vrv_cast(this->GetFirstAncestor(DOC)); - assert(doc); - if (doc->IsFacs()) { - return FacsimileInterface::GetDrawingY(); - } - } + if (m_drawingFacsY != VRV_UNSET) return m_drawingFacsY + this->GetDrawingYRel(); if (m_cachedDrawingY != VRV_UNSET) return m_cachedDrawingY;