Skip to content

Commit

Permalink
Add PAEOutput::HasFermata helper
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Feb 20, 2024
1 parent 7e54f75 commit 7ce8b6d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions include/vrv/iopae.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class PAEOutput : public Output {
///@{
void WriteDur(DurationInterface *interface);
void WriteGrace(AttGraced *attGraced);
bool HasFermata(Object *object);
///@}

public:
Expand Down
12 changes: 9 additions & 3 deletions src/iopae.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,7 @@ void PAEOutput::WriteNote(Note *note)
m_streamStringOutput << accid;
}

PointingToComparison pointingToComparisonFermata(FERMATA, note);
Fermata *fermata
= vrv_cast<Fermata *>(m_currentMeasure->FindDescendantByComparison(&pointingToComparisonFermata, 1));
bool fermata = this->HasFermata(note);
if (fermata) m_streamStringOutput << "(";

std::string pname = note->AttPitch::PitchnameToStr(note->GetPname());
Expand Down Expand Up @@ -583,6 +581,14 @@ void PAEOutput::WriteGrace(AttGraced *attGraced)
}
}

bool PAEOutput::HasFermata(Object *object)
{
PointingToComparison pointingToComparisonFermata(FERMATA, object);
Fermata *fermata
= vrv_cast<Fermata *>(m_currentMeasure->FindDescendantByComparison(&pointingToComparisonFermata, 1));
return (fermata);
}

//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#ifdef USE_PAE_OLD_PARSER
Expand Down

0 comments on commit 7ce8b6d

Please sign in to comment.