From: Stefan Csomor Date: Sun, 9 Jan 2005 09:55:27 +0000 (+0000) Subject: optimizing gauge cpu usage X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/456fd7b661b2aa150443fe47a8c9c728c0509f73 optimizing gauge cpu usage git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/gauge.cpp b/src/mac/carbon/gauge.cpp index 8dadaff83f..6f97b03578 100644 --- a/src/mac/carbon/gauge.cpp +++ b/src/mac/carbon/gauge.cpp @@ -73,6 +73,7 @@ void wxGauge::SetValue(int pos) if ( m_peer && m_peer->Ok() ) { m_peer->SetValue( GetValue() ) ; + // we turn off animation in the unnecessary situations as this is eating a lot of CPU otherwise Boolean shouldAnimate = ( GetValue() > 0 && GetValue() < GetRange() ) ; if ( m_peer->GetData( kControlEntireControl , kControlProgressBarAnimatingTag ) != shouldAnimate ) {