X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b1fe32e2e392078ea65c528b290611584849929..3e5270737bd7a4b21570e61c7cc37b08236b5eae:/src/mac/carbon/gauge.cpp diff --git a/src/mac/carbon/gauge.cpp b/src/mac/carbon/gauge.cpp index 8dadaff83f..1970134e2f 100644 --- a/src/mac/carbon/gauge.cpp +++ b/src/mac/carbon/gauge.cpp @@ -9,14 +9,16 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "gauge.h" #endif -#include "wx/gauge.h" +#include "wx/wxprec.h" #if wxUSE_GAUGE +#include "wx/gauge.h" + #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) #endif @@ -73,6 +75,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 ) {