diff --git a/src/toolkit.cpp b/src/toolkit.cpp index 3ed1bd7bbc..7d608678b2 100644 --- a/src/toolkit.cpp +++ b/src/toolkit.cpp @@ -1888,6 +1888,8 @@ std::string Toolkit::GetElementsAtTime(int millisec) ListOfObjects chords; measure->FindAllDescendantsByComparison(¬esOrRests, &matchTime); + ClassIdsComparison mRestComparison({ MULTIREST, MREST }); + measure->FindAllDescendantsByComparison(¬esOrRests, &mRestComparison, UNLIMITED_DEPTH, FORWARD, false); // Fill the JSON object for (Object *object : notesOrRests) { @@ -1898,7 +1900,7 @@ std::string Toolkit::GetElementsAtTime(int millisec) Chord *chord = note->IsChordTone(); if (chord) chords.push_back(chord); } - else if (object->Is(REST)) { + else if (object->Is({ MREST, MULTIREST, REST })) { restArray << object->GetID(); } }