Line up percussion hits correctly.
git-svn-id: svn://localhost/ardour2/trunk@2241 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -26,7 +26,7 @@ Diamond::Diamond(Group& group, double height)
|
||||
: Polygon(group)
|
||||
{
|
||||
Points points;
|
||||
points.push_back(Point(0, height*2));
|
||||
points.push_back(Point(0, height*2.0));
|
||||
points.push_back(Point(height, height));
|
||||
points.push_back(Point(0, 0));
|
||||
points.push_back(Point(-height, height));
|
||||
|
||||
@@ -507,7 +507,7 @@ MidiRegionView::add_event (const MidiEvent& ev)
|
||||
const Byte& note = ev.buffer()[1];
|
||||
const double diamond_size = midi_stream_view()->note_height() / 2.0;
|
||||
const double x = trackview.editor.frame_to_pixel((nframes_t)ev.time());
|
||||
const double y = midi_stream_view()->note_to_y(note) + (diamond_size / 2.0);
|
||||
const double y = midi_stream_view()->note_to_y(note) + ((diamond_size-2) / 4.0);
|
||||
|
||||
CanvasHit* ev_diamond = new CanvasHit(*this, *group, diamond_size);
|
||||
ev_diamond->move(x, y);
|
||||
@@ -574,7 +574,7 @@ MidiRegionView::add_note (const MidiModel::Note& note)
|
||||
} else if (midi_view()->note_mode() == Percussive) {
|
||||
const double diamond_size = midi_stream_view()->note_height() / 2.0;
|
||||
const double x = trackview.editor.frame_to_pixel((nframes_t)note.time());
|
||||
const double y = midi_stream_view()->note_to_y(note.note()) + (diamond_size / 2.0) - 2;
|
||||
const double y = midi_stream_view()->note_to_y(note.note()) + ((diamond_size-2) / 4.0);
|
||||
|
||||
CanvasHit* ev_diamond = new CanvasHit(*this, *group, diamond_size);
|
||||
ev_diamond->move(x, y);
|
||||
|
||||
Reference in New Issue
Block a user