preferencesAboutTextFull
Claudio Valerio 13 years ago
parent 86f30482d7
commit 1eba2bb0f4
  1. 6
      src/gui/UBTeacherBarWidget.cpp

@ -356,6 +356,7 @@ void UBTeacherBarWidget::loadContent()
// Update the fields of the preview widget // Update the fields of the preview widget
mpPreview->setTitle(mpTitle->text()); mpPreview->setTitle(mpTitle->text());
mpPreview->mediaViewer()->loadMedia(nextInfos.medias); mpPreview->mediaViewer()->loadMedia(nextInfos.medias);
mpStackWidget->setCurrentWidget(mpPreview); mpStackWidget->setCurrentWidget(mpPreview);
if(mpDuration1->isChecked()){ if(mpDuration1->isChecked()){
mpPreview->setDuration(eDuration_Quarter); mpPreview->setDuration(eDuration_Quarter);
@ -366,6 +367,9 @@ void UBTeacherBarWidget::loadContent()
} }
} }
// this is always done becasue it allows to clean the media on
// changing the page
mpPreview->mediaViewer()->loadMedia(nextInfos.medias);
} }
bool UBTeacherBarWidget::isEmpty() bool UBTeacherBarWidget::isEmpty()
@ -829,8 +833,6 @@ UBTeacherBarPreviewMedia::~UBTeacherBarPreviewMedia()
void UBTeacherBarPreviewMedia::loadMedia(QStringList pMedias) void UBTeacherBarPreviewMedia::loadMedia(QStringList pMedias)
{ {
foreach(QWidget* eachWidget, mWidgetList.keys())
delete eachWidget;
mWidgetList.clear(); mWidgetList.clear();
foreach(QString eachString, pMedias){ foreach(QString eachString, pMedias){
if(!eachString.isEmpty()){ if(!eachString.isEmpty()){

Loading…
Cancel
Save