X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..e1efca652844273c3e8d32c7e5f442b87e455ca7:/samples/widgets/gauge.cpp?ds=sidebyside diff --git a/samples/widgets/gauge.cpp b/samples/widgets/gauge.cpp index 011702d0c3..6b16d3757a 100644 --- a/samples/widgets/gauge.cpp +++ b/samples/widgets/gauge.cpp @@ -6,7 +6,7 @@ // Created: 27.03.01 // Id: $Id$ // Copyright: (c) 2001 Vadim Zeitlin -// License: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -303,7 +303,7 @@ void GaugeWidgetsPage::CreateGauge() wxDefaultPosition, wxDefaultSize, flags); m_gauge->SetValue(val); - + if ( flags & wxGA_VERTICAL ) m_sizerGauge->Add(m_gauge, 0, wxGROW | wxALL, 5); else @@ -335,8 +335,7 @@ void GaugeWidgetsPage::StopTimer(wxButton *clicked) wxCHECK_RET( m_timer, wxT("shouldn't be called") ); m_timer->Stop(); - delete m_timer; - m_timer = NULL; + wxDELETE(m_timer); if (clicked->GetId() == GaugePage_Progress) { @@ -389,6 +388,8 @@ void GaugeWidgetsPage::OnButtonIndeterminateProgress(wxCommandEvent& event) { StopTimer(b); + m_gauge->SetValue(0); + wxLogMessage(wxT("Stopped the timer.")); } }