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:
		@@ -314,19 +314,7 @@ void SpinBtnWidgetsPage::CreateSpin()
 | 
				
			|||||||
            val = valOld;
 | 
					            val = valOld;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        m_sizerSpin->Detach( m_spinbtn );
 | 
					        m_sizerSpin->Clear(true /* delete windows */);
 | 
				
			||||||
        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_spinbtn = new wxSpinButton(this, SpinBtnPage_SpinBtn,
 | 
					    m_spinbtn = new wxSpinButton(this, SpinBtnPage_SpinBtn,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user