Commit bc941dd4 authored by Claudio Valerio's avatar Claudio Valerio

fixed teacher guide licence index out of boundaries

parent 831765cc
......@@ -767,8 +767,10 @@ void UBTeacherGuidePageZeroEditionWidget::switchToMode(tUBTGZeroPageMode mode)
mpLicenceValueLabel->setText(mpLicenceBox->currentText());
QStringList licenceIconList;
licenceIconList << ":images/licenses/ccby.png" << ":images/licenses/ccbynd.png" << ":images/licenses/ccbysa.png" << ":images/licenses/ccbync.png" << ":images/licenses/ccbyncnd.png" << ":images/licenses/ccbyncsa.png";
if(mpLicenceBox->currentIndex() < 6){
mpLicenceIcon->setPixmap(licenceIconList.at(mpLicenceBox->currentIndex()));
int licenceBoxCurrentIndex = mpLicenceBox->currentIndex();
// -1 is return if there is no values on the box
if(licenceBoxCurrentIndex > 0 && licenceBoxCurrentIndex < licenceIconList.count()){
mpLicenceIcon->setPixmap(licenceIconList.at(licenceBoxCurrentIndex));
mpLicenceIcon->show();
}
mpLicenceValueLabel->show();
......
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