Fix channel indicator being on by default

This commit is contained in:
Lukas W
2016-03-07 09:48:44 +13:00
parent 44f688e285
commit 8768769450

View File

@@ -83,7 +83,7 @@ void FadeButton::customEvent( QEvent * )
void FadeButton::paintEvent( QPaintEvent * _pe )
{
QColor col = m_normalColor;
if( m_stateTimer.elapsed() < FadeDuration )
if( ! m_stateTimer.isNull() && m_stateTimer.elapsed() < FadeDuration )
{
const float state = 1 - m_stateTimer.elapsed() / FadeDuration;
const int r = (int)( m_normalColor.red() *