Qt/InfoWidget: Don't show banner details if no data is present

This commit is contained in:
spycrab 2018-05-25 02:20:52 +02:00
parent a68b8202e1
commit a19e5b3f7a
1 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,9 @@ InfoWidget::InfoWidget(const UICommon::GameFile& game) : m_game(game)
QVBoxLayout* layout = new QVBoxLayout();
layout->addWidget(CreateISODetails());
layout->addWidget(CreateBannerDetails());
if (!game.GetLanguages().empty())
layout->addWidget(CreateBannerDetails());
setLayout(layout);
}
@ -144,6 +146,7 @@ void InfoWidget::CreateLanguageSelector()
}
if (m_language_selector->count() == 1)
m_language_selector->setDisabled(true);
connect(m_language_selector,
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
&InfoWidget::ChangeLanguage);