delete the old labels when recreating the spin controls

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-09-14 19:53:31 +00:00
parent 242ec2f7e9
commit 55ab5200fb

View File

@ -314,19 +314,7 @@ void SpinBtnWidgetsPage::CreateSpin()
val = valOld;
}
m_sizerSpin->Detach( m_spinbtn );
m_sizerSpin->Detach( m_spinctrl );
m_sizerSpin->Detach( m_spinctrldbl );
// there are 4 spacers left
m_sizerSpin->Remove( 0 );
m_sizerSpin->Remove( 0 );
m_sizerSpin->Remove( 0 );
m_sizerSpin->Remove( 0 );
delete m_spinbtn;
delete m_spinctrl;
delete m_spinctrldbl;
m_sizerSpin->Clear(true /* delete windows */);
}
m_spinbtn = new wxSpinButton(this, SpinBtnPage_SpinBtn,