optimizing gauge cpu usage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2b1fe32e2e
commit
456fd7b661
@ -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 )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user