Make sure notes fit in the allocated height of a newly-created ghost region.
git-svn-id: svn://localhost/ardour2/branches/3.0@8983 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ee92df2a25
commit
5c2c0b3f75
@ -1324,16 +1324,16 @@ MidiRegionView::add_ghost (TimeAxisView& tv)
|
||||
ghost = new MidiGhostRegion (tv, trackview, unit_position);
|
||||
}
|
||||
|
||||
ghost->set_height ();
|
||||
ghost->set_duration (_region->length() / samples_per_unit);
|
||||
ghosts.push_back (ghost);
|
||||
|
||||
for (Events::iterator i = _events.begin(); i != _events.end(); ++i) {
|
||||
if ((note = dynamic_cast<CanvasNote*>(*i)) != 0) {
|
||||
ghost->add_note(note);
|
||||
}
|
||||
}
|
||||
|
||||
ghost->set_height ();
|
||||
ghost->set_duration (_region->length() / samples_per_unit);
|
||||
ghosts.push_back (ghost);
|
||||
|
||||
GhostRegion::CatchDeletion.connect (*this, invalidator (*this), ui_bind (&RegionView::remove_ghost, this, _1), gui_context());
|
||||
|
||||
return ghost;
|
||||
|
Loading…
Reference in New Issue
Block a user