Skip to content

Commit

Permalink
Fixing tuplet figures
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Mar 14, 2015
1 parent e82a67d commit 12dbbf4
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/view_tuplet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ bool View::GetTupletCoordinates(Tuplet* tuplet, Layer *layer, Point* start, Poin

// align the center point at the exact center of the first an last stem
// TUPLET_OFFSET is summed so it does not collide with the stem
if (firstNote->m_drawingStemDir)
if (firstNote->m_drawingStemDir == STEMDIRECTION_up)
y = lastNote->m_drawingStemEnd.y + (firstNote->m_drawingStemEnd.y - lastNote->m_drawingStemEnd.y) / 2 + TUPLET_OFFSET;
else
y = lastNote->m_drawingStemEnd.y + (firstNote->m_drawingStemEnd.y - lastNote->m_drawingStemEnd.y) / 2 - TUPLET_OFFSET;
Expand All @@ -107,20 +107,6 @@ bool View::GetTupletCoordinates(Tuplet* tuplet, Layer *layer, Point* start, Poin
center->y = y;
direction = firstNote->m_drawingStemDir; // stem direction is same for all notes
} else {

//ArrayOfObjects all_notes;

// We can have a mixed group of Beams and notes. Flatten it
/*
for (unsigned int i = 0; i < tuplet->m_children.size(); i++) {
if (dynamic_cast<Note*>(tuplet->m_children[i]))
all_notes.push_back(tuplet->m_children[i]);
if (dynamic_cast<Beam*>(tuplet->m_children[i])) {
Beam* beam = dynamic_cast<Beam*>(tuplet->m_children[i]);
std::copy( beam->m_list.begin(), beam->m_list.end(), std::back_inserter( all_notes ) );
}
}*/

// There are unbeamed notes of two different beams
// treat all the notes as unbeames
Expand Down

0 comments on commit 12dbbf4

Please sign in to comment.