diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 1a945651e0..6cfb41aa52 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1255,12 +1255,12 @@ Editor::set_session (Session *t) if (!_pianoroll) { // XXX this should really not happen here _pianoroll = new Pianoroll ("editor pianoroll"); - _pianoroll->viewport().set_size_request (600, 120); + _pianoroll->viewport().set_size_request (-1, 120); } _pianoroll->set_session (_session); _bottom_hbox.pack_start(*_properties_box, true, true); - _bottom_hbox.pack_start(_pianoroll->contents(), true, true); + /* _pianoroll is packed on demand in Editor::region_selection_changed */ _bottom_hbox.show_all(); if (rhythm_ferret) { diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index 249a64e4bf..5a24bd29ae 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -53,6 +53,7 @@ #include "keyboard.h" #include "midi_region_view.h" #include "pianoroll.h" +#include "selection_properties_box.h" #include "sfdb_ui.h" #include "pbd/i18n.h" @@ -1715,7 +1716,7 @@ Editor::region_selection_changed () } update_selection_markers (); - _pianoroll->contents().hide (); + bool pack_pianoroll = false; if (selection->regions.size () == 1) { RegionView* rv = (selection->regions.front ()); MidiRegionView* mrv = dynamic_cast (rv); @@ -1725,10 +1726,20 @@ Editor::region_selection_changed () if (mrv && mt && mr) { _pianoroll->set_track (mt); _pianoroll->set_region (mr); - _pianoroll->contents().show (); + pack_pianoroll = true; } } } + Gtkmm2ext::container_clear (_bottom_hbox); + if (pack_pianoroll) { + _bottom_hbox.pack_start(*_properties_box, false, false); + _bottom_hbox.pack_start(_pianoroll->contents(), true, true); + _pianoroll->contents().hide (); + _pianoroll->contents().show_all (); + } else { + _bottom_hbox.pack_start(*_properties_box, true, true); + } + _properties_box->show (); } void diff --git a/gtk2_ardour/selection_properties_box.cc b/gtk2_ardour/selection_properties_box.cc index 52ce811af7..c95c04164c 100644 --- a/gtk2_ardour/selection_properties_box.cc +++ b/gtk2_ardour/selection_properties_box.cc @@ -180,6 +180,7 @@ SelectionPropertiesBox::selection_changed () _region_fx_box = new RegionFxPropertiesBox (rv->region ()); _region_editor_box.pack_start (*_region_fx_box); + _region_editor_box.show (); rv->RegionViewGoingAway.connect_same_thread (_region_connection, std::bind (&SelectionPropertiesBox::delete_region_editor, this)); } _region_editor_box.show ();