Proposed fix 888 Bar, Beat and Tick should follow dragged timeline

This commit is contained in:
Dave French
2015-01-07 20:08:18 +00:00
parent 13bdfb4b13
commit c0fc56eaea

View File

@@ -106,12 +106,13 @@ void TimeDisplayWidget::updateTime()
break;
case BarsTicks:
m_majorLCD.setValue( s->getTacts() + 1 );
m_minorLCD.setValue( ( s->getTicks() % s->ticksPerTact() ) /
( s->ticksPerTact() / s->getTimeSigModel().getNumerator() ) +1 );
;
m_milliSecondsLCD.setValue( ( s->getTicks() % s->ticksPerTact() ) %
( s->ticksPerTact() / s->getTimeSigModel().getNumerator() ) );
int tick;
tick = ( s->getMilliseconds() * s->getTempo() * 48 ) / 60000 ;
m_majorLCD.setValue( (int)(tick / s->ticksPerTact() ) + 1);
m_minorLCD.setValue( ( tick % s->ticksPerTact() ) /
( s->ticksPerTact() / s->getTimeSigModel().getNumerator() ) +1 );
m_milliSecondsLCD.setValue( ( tick % s->ticksPerTact() ) %
( s->ticksPerTact() / s->getTimeSigModel().getNumerator() ) );
break;
default: break;