Skip to content

Commit

Permalink
Fix display of bar:beat:tick display when tempo is changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
PhysSong committed Oct 23, 2017
1 parent 72501a0 commit a78093b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/gui/widgets/TimeDisplayWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ void TimeDisplayWidget::updateTime()

case BarsTicks:
int tick;
tick = ( s->getMilliseconds() * s->getTempo() * (DefaultTicksPerTact / 4 ) ) / 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() ) );
tick = s->getPlayPos().getTicks();
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;
Expand Down

0 comments on commit a78093b

Please sign in to comment.