From 831765ccfe214a78d2d95d61f9033f3d9505331b Mon Sep 17 00:00:00 2001 From: Aleksei Kanash Date: Thu, 26 Apr 2012 12:40:48 +0300 Subject: [PATCH 1/2] Fix to SANKORE-626. Display widget displaying correctly now. --- src/core/UBDisplayManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/UBDisplayManager.cpp b/src/core/UBDisplayManager.cpp index 1d441adb..140dc875 100644 --- a/src/core/UBDisplayManager.cpp +++ b/src/core/UBDisplayManager.cpp @@ -146,6 +146,11 @@ void UBDisplayManager::setDisplayWidget(QWidget* pDisplayWidget) { if(pDisplayWidget && (pDisplayWidget != mDisplayWidget)) { + if (mDisplayWidget) + { + pDisplayWidget->setGeometry(mDisplayWidget->geometry()); + pDisplayWidget->setWindowFlags(mDisplayWidget->windowFlags()); + } mDisplayWidget = pDisplayWidget; // !!!! Should be included into Windows after QT recompilation #ifdef Q_WS_MAC From bc941dd41ace91ee6ae387acb57f0de47e17ad8f Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Thu, 26 Apr 2012 13:11:32 +0200 Subject: [PATCH 2/2] fixed teacher guide licence index out of boundaries --- src/gui/UBTeacherGuideWidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/UBTeacherGuideWidget.cpp b/src/gui/UBTeacherGuideWidget.cpp index d6ca56f2..54d9e847 100644 --- a/src/gui/UBTeacherGuideWidget.cpp +++ b/src/gui/UBTeacherGuideWidget.cpp @@ -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();