]> git.saurik.com Git - wxWidgets.git/commitdiff
optimizing gauge cpu usage
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 9 Jan 2005 09:55:27 +0000 (09:55 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 9 Jan 2005 09:55:27 +0000 (09:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/gauge.cpp

index 8dadaff83fa6a3683debfe3c818db7edf010d087..6f97b0357833caff02f5efdc843f58bca035c85f 100644 (file)
@@ -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<Boolean>( kControlEntireControl , kControlProgressBarAnimatingTag ) != shouldAnimate )
         {