make dragging a region from the list not crash.
[ardour.git] / gtk2_ardour / editor_drag.cc
index 6d87599e89f40acf082dabd24e17cdd1415a487d..6a143eecd7501cc4e33b4ada96c559c08e439a0f 100644 (file)
@@ -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) {