summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/monitor_section.cc14
-rw-r--r--gtk2_ardour/monitor_section.h1
2 files changed, 10 insertions, 5 deletions
diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc
index 3b78e34612..25e4034182 100644
--- a/gtk2_ardour/monitor_section.cc
+++ b/gtk2_ardour/monitor_section.cc
@@ -36,6 +36,8 @@ MonitorSection::MonitorSection (Session* s)
: AxisView (s)
, RouteUI (s)
, _tearoff (0)
+ , channel_table_viewport (*channel_table_scroller.get_hadjustment(),
+ *channel_table_scroller.get_vadjustment ())
, gain_control (0)
, dim_control (0)
, solo_boost_control (0)
@@ -257,7 +259,8 @@ MonitorSection::MonitorSection (Session* s)
channel_table_scroller.set_size_request (-1, 150);
channel_table_scroller.set_shadow_type (Gtk::SHADOW_NONE);
channel_table_scroller.show ();
-
+ channel_table_scroller.add (channel_table_viewport);
+
channel_size_group = SizeGroup::create (SIZE_GROUP_HORIZONTAL);
channel_size_group->add_widget (channel_table_header);
channel_size_group->add_widget (channel_table);
@@ -357,23 +360,24 @@ MonitorSection::set_session (Session* s)
if (channel_table_scroller.get_parent()) {
/* scroller is packed, so remove it */
channel_table_packer.remove (channel_table_scroller);
- /* remove the table_hpacker from the scroller */
- channel_table_scroller.remove ();
}
- if (table_hpacker.get_parent ()) {
+ if (table_hpacker.get_parent () == &channel_table_packer) {
/* this occurs when the table hpacker is directly
packed, so remove it.
*/
channel_table_packer.remove (table_hpacker);
+ } else if (table_hpacker.get_parent()) {
+ channel_table_viewport.remove ();
}
if (_monitor->output_streams().n_audio() > 7) {
/* put the table into a scrolled window, and then put
* that into the channel vpacker, after the table header
*/
- channel_table_scroller.add (table_hpacker);
+ channel_table_viewport.add (table_hpacker);
channel_table_packer.pack_start (channel_table_scroller, true, true);
+ channel_table_viewport.show ();
channel_table_scroller.show ();
} else {
diff --git a/gtk2_ardour/monitor_section.h b/gtk2_ardour/monitor_section.h
index 185720856b..f7848a3f01 100644
--- a/gtk2_ardour/monitor_section.h
+++ b/gtk2_ardour/monitor_section.h
@@ -59,6 +59,7 @@ class MonitorSection : public RouteUI
Gtk::Table channel_table;
Gtk::Table channel_table_header;
Gtk::ScrolledWindow channel_table_scroller;
+ Gtk::Viewport channel_table_viewport;
Glib::RefPtr<Gtk::SizeGroup> channel_size_group;
struct ChannelButtonSet {