From ef2e24c0d80dff8efd85146f5b3920032605ffc7 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Fri, 6 Jan 2012 13:23:48 +0100 Subject: [PATCH] fixed widget to load on page change regarding the stored information --- src/gui/UBTeacherBarWidget.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/UBTeacherBarWidget.cpp b/src/gui/UBTeacherBarWidget.cpp index 670dde8d..43df4246 100644 --- a/src/gui/UBTeacherBarWidget.cpp +++ b/src/gui/UBTeacherBarWidget.cpp @@ -352,6 +352,8 @@ void UBTeacherBarWidget::loadContent() mpComments->document()->setPlainText(nextInfos.comments); } + mpPreview->mediaViewer()->cleanMedia(); + if(!isEmpty()){ // Update the fields of the preview widget mpPreview->setTitle(mpTitle->text()); @@ -366,9 +368,12 @@ void UBTeacherBarWidget::loadContent() mpPreview->setDuration(eDuration_ThreeQuarter); } mpPreview->setComments(mpComments->document()->toPlainText()); - mpPreview->mediaViewer()->cleanMedia(); mpPreview->mediaViewer()->loadMedia(nextInfos.medias); } + else{ + mpStackWidget->setCurrentWidget(mpContainer); + } + }