make dragging a region from the list not crash.
- its still a fake event, but we can at least get the snap correct. - playlist->add_region() parameters were whacky (for Playlist::add_region_internal()?)
This commit is contained in:
parent
f751a0993b
commit
b04f89be51
|
@ -1316,7 +1316,7 @@ Editor::drop_regions (const Glib::RefPtr<Gdk::DragContext>& /*context*/,
|
|||
if ((boost::dynamic_pointer_cast<AudioRegion> (region_copy) != 0 && dynamic_cast<AudioTimeAxisView*> (rtav) != 0) ||
|
||||
(boost::dynamic_pointer_cast<MidiRegion> (region_copy) != 0 && dynamic_cast<MidiTimeAxisView*> (rtav) != 0)) {
|
||||
_drags->set (new RegionInsertDrag (this, region_copy, rtav, pos), &event);
|
||||
_drags->end_grab (0);
|
||||
_drags->end_grab (&event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1982,7 +1982,9 @@ RegionInsertDrag::finished (GdkEvent * event, bool)
|
|||
|
||||
_editor->begin_reversible_command (Operations::insert_region);
|
||||
playlist->clear_changes ();
|
||||
playlist->add_region (_primary->region (), _last_position.frame, _editor->get_grid_music_divisions (event->button.state));
|
||||
_editor->snap_to_with_modifier (_last_position, event);
|
||||
|
||||
playlist->add_region (_primary->region (), _last_position.frame, 1.0, false, _last_position.division);
|
||||
|
||||
// Mixbus doesn't seem to ripple when inserting regions from the list: should we? yes, probably
|
||||
if (Config->get_edit_mode() == Ripple) {
|
||||
|
|
Loading…
Reference in New Issue