making text disappear before backgrounds change

This commit is contained in:
Chris Cochrun 2022-09-24 14:56:48 -05:00
parent 453ca7eefe
commit e200a67387

View file

@ -204,7 +204,16 @@ void Slide::changeSlide(QVariantMap item)
{ {
setServiceItem(item); setServiceItem(item);
setType(m_serviceItem.value("type").toString()); setType(m_serviceItem.value("type").toString());
qDebug() << "#$% SLIDE TYPE: " << type() << " %$#";
// First let's clear the text and then set
// the size and index of a basic slide
// then we'll build the rest
setText("");
m_slideSize = 1;
m_slideIndex = 1;
qDebug() << serviceItem().value("backgroundType").toString();
if (serviceItem().value("backgroundType") == "image") { if (serviceItem().value("backgroundType") == "image") {
setImageBackground(m_serviceItem.value("background").toString()); setImageBackground(m_serviceItem.value("background").toString());
setVideoBackground(""); setVideoBackground("");
@ -213,10 +222,6 @@ void Slide::changeSlide(QVariantMap item)
setImageBackground(""); setImageBackground("");
} }
setText("");
m_slideSize = 1;
m_slideIndex = 1;
if (type() == "presentation") { if (type() == "presentation") {
qDebug() << "#$#$#$#$ THIS PDF $#$#$#$#"; qDebug() << "#$#$#$#$ THIS PDF $#$#$#$#";
int pageCount; int pageCount;
@ -238,8 +243,8 @@ void Slide::changeSlide(QVariantMap item)
qDebug() << m_imageCount; qDebug() << m_imageCount;
m_slideSize = m_imageCount; m_slideSize = m_imageCount;
m_slideIndex = 1; m_slideIndex = 1;
setPdfIndex(1);
} }
setPdfIndex(0);
QStringList text = m_serviceItem.value("text").toStringList(); QStringList text = m_serviceItem.value("text").toStringList();
if (type() == "song") { if (type() == "song") {