Don't start with all possible content tabs visible.
authorCarl Hetherington <cth@carlh.net>
Tue, 24 Jul 2018 22:04:01 +0000 (23:04 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 24 Jul 2018 22:04:01 +0000 (23:04 +0100)
src/wx/content_panel.cc
src/wx/content_sub_panel.cc

index 8203727282edfc876d9171f0a88e1afcc87f437a..05079604bd44ec6626555f3a845f1bdde0ad3eaa 100644 (file)
@@ -379,7 +379,7 @@ ContentPanel::selection_changed ()
                }
        }
 
-       if (!done) {
+       if (!done && _notebook->GetPageCount() > 0) {
                _notebook->SetSelection (0);
        }
 
index a60a657073ae2be6d65c2b61a07d330acc1780db..a30d3cfce061155bb7fb5ee6c72e183f7649b7ed 100644 (file)
@@ -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);
 }