From e7ae93929b7d68ae51b0997b9bdefde0ce979c96 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 6 Jun 2024 16:12:09 -0600 Subject: [PATCH] correctly set timeline_origin for a MidiCueEditor for some reason the width is different when ::set_region() is called --- gtk2_ardour/midi_cue_editor.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk2_ardour/midi_cue_editor.cc b/gtk2_ardour/midi_cue_editor.cc index 9a065e807a..31a91d4b6f 100644 --- a/gtk2_ardour/midi_cue_editor.cc +++ b/gtk2_ardour/midi_cue_editor.cc @@ -275,6 +275,8 @@ MidiCueEditor::build_canvas () prh->set_position (Duple (0., n_timebars * timebar_height)); data_group->set_position (ArdourCanvas::Duple (w, timebar_height * n_timebars)); + + _timeline_origin = w; h_scroll_group->set_position (Duple (w, 0.)); _canvas->set_name ("MidiCueCanvas"); @@ -419,6 +421,8 @@ MidiCueEditor::set_region (std::shared_ptr t, std::shared_ptr /* Move stuff around */ + _timeline_origin = w; + prh->set_position (Duple (0., n_timebars * timebar_height)); data_group->set_position (ArdourCanvas::Duple (w, timebar_height * n_timebars)); h_scroll_group->set_position (Duple (w, 0.));