Hide port matrix notebook tabs if there's only one.
git-svn-id: svn://localhost/ardour2/branches/3.0@6279 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
be79bc7916
commit
4a836618f3
|
@ -82,7 +82,11 @@ PortMatrix::PortMatrix (Window* parent, Session& session, DataType type)
|
|||
_hlabel.set_alignment (0, 0.5);
|
||||
_hlabel.set_padding (16, 4);
|
||||
|
||||
show_all ();
|
||||
_body->show ();
|
||||
_vbox.show ();
|
||||
_hbox.show ();
|
||||
_vlabel.show ();
|
||||
_hlabel.show ();
|
||||
}
|
||||
|
||||
PortMatrix::~PortMatrix ()
|
||||
|
@ -174,8 +178,6 @@ PortMatrix::setup ()
|
|||
setup_scrollbars ();
|
||||
setup_notebooks ();
|
||||
queue_draw ();
|
||||
|
||||
show_all ();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -644,6 +646,18 @@ PortMatrix::setup_notebooks ()
|
|||
if (v_current_page != -1 && _vnotebook.get_n_pages() > v_current_page) {
|
||||
_vnotebook.set_current_page (v_current_page);
|
||||
}
|
||||
|
||||
if (_hnotebook.get_n_pages() <= 1) {
|
||||
_hnotebook.hide ();
|
||||
} else {
|
||||
_hnotebook.show ();
|
||||
}
|
||||
|
||||
if (_vnotebook.get_n_pages() <= 1) {
|
||||
_vnotebook.hide ();
|
||||
} else {
|
||||
_vnotebook.show ();
|
||||
}
|
||||
|
||||
_in_setup_notebooks = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user