mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
Fix audio region copy-drag, partially fix MIDI region copy-drag (thanks torbenh).
git-svn-id: svn://localhost/ardour2/branches/3.0@3809 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6f4daaae0a
commit
abf64beac6
4 changed files with 59 additions and 12 deletions
|
|
@ -3329,21 +3329,24 @@ Editor::possibly_copy_regions_during_grab (GdkEvent* event)
|
|||
RegionView* nrv;
|
||||
|
||||
rv = (*i);
|
||||
|
||||
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(rv);
|
||||
MidiRegionView* mrv = dynamic_cast<MidiRegionView*>(rv);
|
||||
|
||||
if (arv) {
|
||||
nrv = new AudioRegionView (*arv);
|
||||
} else if (mrv) {
|
||||
nrv = new MidiRegionView (*mrv);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
const boost::shared_ptr<const Region> original = rv->region();
|
||||
boost::shared_ptr<Region> region_copy = RegionFactory::create (original);
|
||||
|
||||
if (arv) {
|
||||
boost::shared_ptr<AudioRegion> audioregion_copy
|
||||
= boost::dynamic_pointer_cast<AudioRegion>(region_copy);
|
||||
nrv = new AudioRegionView (*arv, audioregion_copy);
|
||||
} else if (mrv) {
|
||||
boost::shared_ptr<MidiRegion> midiregion_copy
|
||||
= boost::dynamic_pointer_cast<MidiRegion>(region_copy);
|
||||
nrv = new MidiRegionView (*mrv, midiregion_copy);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
nrv->get_canvas_group()->show ();
|
||||
new_regionviews.push_back (nrv);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue