Commit 900ec2aa authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

welcome screen: fix tip cycling

parent 01cc5b48
......@@ -314,13 +314,15 @@ void WelcomeMode::slotFeedback()
void WelcomeMode::slotNextTip()
{
QStringList tips = tipsOfTheDay();
m_d->ui.didYouKnowTextBrowser->setText(tips.at((++m_d->currentTip)%tips.count()));
m_d->currentTip = ((m_d->currentTip+1)%tips.count());
m_d->ui.didYouKnowTextBrowser->setText(tips.at(m_d->currentTip));
}
void WelcomeMode::slotPrevTip()
{
QStringList tips = tipsOfTheDay();
m_d->ui.didYouKnowTextBrowser->setText(tips.at((--m_d->currentTip)%tips.count()));
m_d->currentTip = tips.count()-((m_d->currentTip-1)%tips.count());
m_d->ui.didYouKnowTextBrowser->setText(tips.at(m_d->currentTip));
}
QStringList WelcomeMode::tipsOfTheDay()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment