From bfc79f85fa979a9c3b0f17f2040e0ae0181cb733 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 24 Jul 2018 23:04:01 +0100 Subject: [PATCH] Don't start with all possible content tabs visible. --- src/wx/content_panel.cc | 2 +- src/wx/content_sub_panel.cc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index 820372728..05079604b 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -379,7 +379,7 @@ ContentPanel::selection_changed () } } - if (!done) { + if (!done && _notebook->GetPageCount() > 0) { _notebook->SetSelection (0); } diff --git a/src/wx/content_sub_panel.cc b/src/wx/content_sub_panel.cc index a60a65707..a30d3cfce 100644 --- a/src/wx/content_sub_panel.cc +++ b/src/wx/content_sub_panel.cc @@ -37,7 +37,6 @@ ContentSubPanel::ContentSubPanel (ContentPanel* p, wxString name) , _sizer (new wxBoxSizer (wxVERTICAL)) , _name (name) { - p->notebook()->AddPage (this, _name, false); SetScrollRate (-1, 8); SetSizer (_sizer); } -- 2.30.2