fixed bug in duplicating last item after video or image item
This commit is contained in:
parent
036f83ecfe
commit
09b6370153
2 changed files with 15 additions and 1 deletions
|
@ -108,6 +108,7 @@ Controls.Page {
|
|||
|
||||
function changeServiceItem(index) {
|
||||
const item = serviceItemModel.getItem(index);
|
||||
print("index grabbed: " + index);
|
||||
|
||||
presentation.stopVideo()
|
||||
presentation.itemType = item.type;
|
||||
|
@ -128,7 +129,7 @@ Controls.Page {
|
|||
else
|
||||
presentation.text = item.text;
|
||||
presentation.textIndex = 0;
|
||||
presentation.nextSlideAction();
|
||||
presentation.changeSlide();
|
||||
|
||||
print("Slide changed to: " + item.name);
|
||||
}
|
||||
|
|
|
@ -152,6 +152,19 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
function changeSlide() {
|
||||
if (itemType === "song") {
|
||||
previewSlide.text = root.text[textIndex];
|
||||
print(root.text[textIndex]);
|
||||
textIndex++;
|
||||
} else if (itemType === "video") {
|
||||
clearText();
|
||||
}
|
||||
else if (itemType === "image") {
|
||||
clearText();
|
||||
}
|
||||
}
|
||||
|
||||
function nextSlide() {
|
||||
currentServiceItem++;
|
||||
changeServiceItem(currentServiceItem);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue