1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 16:43:33 +02:00

Fix bug in pushing and popping sizers in notebook pages...

... Wrong sizer was pushed instead of the page's own, and was popped as
current sizer, when the first sub-sizer in the page was done.

But nothing was affected by this error, because notebook pages are used only
in the About dialog, and none of the pages have more than one directly nested
sizer.  So popping null as current sizer didn't matter because the stack did
not deepen again.

PushSizer() only after assigning mpSizer, as with other calls to it.
This commit is contained in:
Paul Licameli
2017-10-28 11:41:09 -04:00
parent ae353fe61f
commit f07d33f4b5

View File

@@ -1005,11 +1005,11 @@ wxNotebookPage * ShuttleGuiBase::StartNotebookPage( const wxString & Name )
pNotebook->AddPage(
pPage,
Name);
PushSizer();
SetProportions( 1 );
mpParent = pPage;
pPage->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
PushSizer();
mpSizer->SetMinSize(250, 500);
// UpdateSizers();
return pPage;
@@ -1028,11 +1028,11 @@ void ShuttleGuiBase::StartNotebookPage( const wxString & Name, wxNotebookPage *
pNotebook->AddPage(
pPage,
Name);
PushSizer();
SetProportions( 1 );
mpParent = pPage;
pPage->SetSizer(mpSizer = safenew wxBoxSizer(wxVERTICAL));
PushSizer();
mpSizer->SetMinSize(250, 500);
// UpdateSizers();
}