remove old a-Hi/Low pass
[ardour.git] / gtk2_ardour / midi_time_axis.cc
index 34c1254c5471adf2ff91568363b3be8897c74664..57cde4af0dd43f57ae6e6dc8cb41fe7e6b7f0b99 100644 (file)
@@ -89,7 +89,7 @@
 
 #include "ardour/midi_track.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace ARDOUR;
 using namespace ARDOUR_UI_UTILS;
@@ -1301,7 +1301,7 @@ MidiTimeAxisView::update_control_names ()
                }
        }
 
-       if (get_selected()) {
+       if (selected()) {
                controls_ebox.set_name (controls_base_selected_name);
                time_axis_frame.set_name (controls_base_selected_name);
        } else {
@@ -1508,7 +1508,7 @@ MidiTimeAxisView::automation_child_menu_item (Evoral::Parameter param)
 }
 
 boost::shared_ptr<MidiRegion>
-MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit)
+MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit, const int32_t sub_num)
 {
        Editor* real_editor = dynamic_cast<Editor*> (&_editor);
        if (commit) {
@@ -1526,8 +1526,9 @@ MidiTimeAxisView::add_region (framepos_t pos, framecnt_t length, bool commit)
        plist.add (ARDOUR::Properties::name, PBD::basename_nosuffix(src->name()));
 
        boost::shared_ptr<Region> region = (RegionFactory::create (src, plist));
-
-       playlist()->add_region (region, pos);
+       /* sets beat position */
+       region->set_position (pos, sub_num);
+       playlist()->add_region (region, pos, 1.0, false, sub_num);
        _session->add_command (new StatefulDiffCommand (playlist()));
 
        if (commit) {
@@ -1634,12 +1635,12 @@ MidiTimeAxisView::capture_channel_mode_changed ()
 }
 
 bool
-MidiTimeAxisView::paste (framepos_t pos, const Selection& selection, PasteContext& ctx)
+MidiTimeAxisView::paste (framepos_t pos, const Selection& selection, PasteContext& ctx, const int32_t sub_num)
 {
        if (!_editor.internal_editing()) {
                // Non-internal paste, paste regions like any other route
-               return RouteTimeAxisView::paste(pos, selection, ctx);
+               return RouteTimeAxisView::paste(pos, selection, ctx, sub_num);
        }
 
-       return midi_view()->paste(pos, selection, ctx);
+       return midi_view()->paste(pos, selection, ctx, sub_num);
 }