diff options
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 6bbc813eb2..00764d0b78 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -1646,9 +1646,11 @@ MidiTimeAxisView::automation_child_menu_item (Evoral::Parameter param) } boost::shared_ptr<MidiRegion> -MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit, const int32_t sub_num) +MidiTimeAxisView::add_region (framepos_t f, framecnt_t length, bool commit) { Editor* real_editor = dynamic_cast<Editor*> (&_editor); + MusicFrame pos (f, 0); + if (commit) { real_editor->begin_reversible_command (Operations::create_region); } @@ -1665,8 +1667,8 @@ MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit, co boost::shared_ptr<Region> region = (RegionFactory::create (src, plist)); /* sets beat position */ - region->set_position (pos, sub_num); - playlist()->add_region (region, pos, 1.0, false, sub_num); + region->set_position (pos.frame, pos.division); + playlist()->add_region (region, pos.frame, 1.0, false, pos.division); _session->add_command (new StatefulDiffCommand (playlist())); if (commit) { |