13
0

cleanup some aspects of midicue editor playhead behavior

This commit is contained in:
Paul Davis 2024-11-11 21:49:55 -07:00
parent bccf36d665
commit 47db75b0d6
3 changed files with 6 additions and 7 deletions

View File

@ -268,7 +268,7 @@ MidiCueEditor::build_canvas ()
prh = new ArdourCanvas::PianoRollHeader (v_scroll_group, *bg);
view = new MidiCueView (nullptr, 0, *data_group, *this, *bg, 0xff0000ff);
view = new MidiCueView (nullptr, 0, *data_group, *no_scroll_group, *this, *bg, 0xff0000ff);
bg->set_view (view);
prh->set_view (view);
@ -282,6 +282,7 @@ MidiCueEditor::build_canvas ()
prh->set_position (Duple (0., n_timebars * timebar_height));
data_group->set_position (ArdourCanvas::Duple (_timeline_origin, timebar_height * n_timebars));
no_scroll_group->set_position (ArdourCanvas::Duple (_timeline_origin, timebar_height * n_timebars));
cursor_scroll_group->set_position (ArdourCanvas::Duple (_timeline_origin, timebar_height * n_timebars));
h_scroll_group->set_position (Duple (_timeline_origin, 0.));
@ -292,6 +293,7 @@ MidiCueEditor::build_canvas ()
_playhead_cursor->set_sensitive (UIConfiguration::instance().get_sensitize_playhead());
_playhead_cursor->set_color (UIConfiguration::instance().color ("play head"));
_playhead_cursor->canvas_item().raise_to_top();
h_scroll_group->raise_to_top ();
_canvas->set_name ("MidiCueCanvas");
_canvas->add_events (Gdk::POINTER_MOTION_HINT_MASK | Gdk::SCROLL_MASK | Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK);
@ -317,11 +319,6 @@ MidiCueEditor::maybe_update ()
return;
}
if (_track->rec_enable_control()->get_value()) {
/* ::data_captured() will handle it */
return;
}
ARDOUR::TriggerPtr trigger = _track->triggerbox()->currently_playing ();
if (!trigger) {

View File

@ -48,6 +48,7 @@ using namespace Gtkmm2ext;
MidiCueView::MidiCueView (std::shared_ptr<ARDOUR::MidiTrack> mt,
uint32_t slot_index,
ArdourCanvas::Item& parent,
ArdourCanvas::Item& noscroll_parent,
EditingContext& ec,
MidiViewBackground& bg,
uint32_t basic_color)
@ -79,7 +80,7 @@ MidiCueView::MidiCueView (std::shared_ptr<ARDOUR::MidiTrack> mt,
automation_group->set_fill_color (UIConfiguration::instance().color ("midi automation track fill"));
automation_group->set_data ("linemerger", this);
button_bar = new ArdourCanvas::Box (&parent, ArdourCanvas::Box::Horizontal);
button_bar = new ArdourCanvas::Box (&noscroll_parent, ArdourCanvas::Box::Horizontal);
CANVAS_DEBUG_NAME (button_bar, "button bar");
button_bar->set_spacing (12.);
/* Right-side padding only */

View File

@ -44,6 +44,7 @@ class MidiCueView : public MidiView
MidiCueView (std::shared_ptr<ARDOUR::MidiTrack> mt,
uint32_t slot_index,
ArdourCanvas::Item& parent,
ArdourCanvas::Item& noscroll_parent,
EditingContext& ec,
MidiViewBackground& bg,
uint32_t basic_color