+ // 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 )
+ {
+ m_peer->SetData<Boolean>( kControlEntireControl , kControlProgressBarAnimatingTag , shouldAnimate ) ;
+ if ( !shouldAnimate )
+ {
+ Refresh() ;
+ }
+ }
+ }