Skip to content

Commit

Permalink
Bugfix for persistency of BeamRestRelation
Browse files Browse the repository at this point in the history
  • Loading branch information
hbitteur committed Aug 18, 2021
1 parent 9ceb475 commit 2d92191
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/org/audiveris/omr/sheet/rhythm/TupletsBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private List<AbstractChordInter> getChordsAround (TupletInter tuplet)
}
}

Collections.sort(chords, new ByEuclidian(tupletCenter));
Collections.sort(chords, new ByEuclidean(tupletCenter));
logger.trace("Chords: {}", Inters.ids(chords));

return chords;
Expand Down Expand Up @@ -339,21 +339,21 @@ private static Staff getTargetStaff (List<AbstractChordInter> candidates)

//~ Inner Classes ------------------------------------------------------------------------------
//-------------//
// ByEuclidian //
// ByEuclidean //
//-------------//
private static class ByEuclidian
private static class ByEuclidean
implements Comparator<AbstractChordInter>
{

/** The location of the tuplet sign */
private final Point signPoint;

ByEuclidian (Point signPoint)
ByEuclidean (Point signPoint)
{
this.signPoint = signPoint;
}

/** Compare their euclidian distance from the signPoint reference */
/** Compare their euclidean distance from the signPoint reference */
@Override
public int compare (AbstractChordInter c1,
AbstractChordInter c2)
Expand Down
2 changes: 2 additions & 0 deletions src/main/org/audiveris/omr/sig/SigValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
import org.audiveris.omr.sig.relation.BarGroupRelation;
import org.audiveris.omr.sig.relation.BeamBeamRelation;
import org.audiveris.omr.sig.relation.BeamHeadRelation;
import org.audiveris.omr.sig.relation.BeamRestRelation;
import org.audiveris.omr.sig.relation.BeamStemRelation;
import org.audiveris.omr.sig.relation.ChordArpeggiatoRelation;
import org.audiveris.omr.sig.relation.ChordArticulationRelation;
Expand Down Expand Up @@ -370,6 +371,7 @@ private static class RelationValue
@XmlElementRef(type = BarGroupRelation.class),
@XmlElementRef(type = BeamBeamRelation.class),
@XmlElementRef(type = BeamHeadRelation.class),
@XmlElementRef(type = BeamRestRelation.class),
@XmlElementRef(type = BeamStemRelation.class),
@XmlElementRef(type = ChordArpeggiatoRelation.class),
@XmlElementRef(type = ChordArticulationRelation.class),
Expand Down
8 changes: 8 additions & 0 deletions src/main/org/audiveris/omr/sig/relation/BeamRestRelation.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ public BeamRestRelation (int dy)
this.dy = dy;
}

/**
* No-arg constructor needed by JAXB.
*/
private BeamRestRelation ()
{
this.dy = 0;
}

//~ Methods ------------------------------------------------------------------------------------
//-------------//
// getDistance //
Expand Down

0 comments on commit 2d92191

Please sign in to comment.