13
0

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:
Carl Hetherington 2011-02-28 03:59:41 +00:00
parent ee92df2a25
commit 5c2c0b3f75

View File

@ -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;