Commit e0084d9e authored by Daniel Molkentin's avatar Daniel Molkentin Committed by con

Show buttons only when more than one tip is available

Task-number: QTCREATORBUG-3160
Reviewed-by: con
parent 03369da5
......@@ -140,8 +140,8 @@ GettingStartedWelcomePageWidget::GettingStartedWelcomePageWidget(QWidget *parent
const QString featureRssFile = Core::ICore::instance()->resourcePath()+QLatin1String("/rss/featured.rss");
emit startRssFetching(QUrl::fromLocalFile(featureRssFile));
ui->nextFeatureBtn->setEnabled(false);
ui->prevFeatureBtn->setEnabled(false);
ui->nextFeatureBtn->hide();
ui->prevFeatureBtn->hide();
connect(ui->nextFeatureBtn, SIGNAL(clicked()), this, SLOT(slotNextFeature()));
connect(ui->prevFeatureBtn, SIGNAL(clicked()), this, SLOT(slotPrevFeature()));
}
......@@ -525,8 +525,10 @@ QStringList GettingStartedWelcomePageWidget::tipsOfTheDay()
void GettingStartedWelcomePageWidget::addToFeatures(const RssItem &feature)
{
m_featuredItems.append(feature);
ui->nextFeatureBtn->setEnabled(true);
ui->prevFeatureBtn->setEnabled(true);
if (m_featuredItems.count() > 1) {
ui->nextFeatureBtn->show();
ui->prevFeatureBtn->show();
}
}
void GettingStartedWelcomePageWidget::showFeature(int feature)
......
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