mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
UI: Fix slide counter with no slides
When a slideshow is created with no slides, the slide counter shows value of "1 / 0". Now it shows "- / -".
This commit is contained in:
parent
e8792ac791
commit
a18f07d49c
|
@ -510,6 +510,11 @@ void MediaControls::UpdateSlideCounter()
|
|||
int total = calldata_int(&cd, "total_files");
|
||||
calldata_free(&cd);
|
||||
|
||||
ui->timerLabel->setText(QString::number(slide + 1));
|
||||
ui->durationLabel->setText(QString::number(total));
|
||||
if (total > 0) {
|
||||
ui->timerLabel->setText(QString::number(slide + 1));
|
||||
ui->durationLabel->setText(QString::number(total));
|
||||
} else {
|
||||
ui->timerLabel->setText("-");
|
||||
ui->durationLabel->setText("-");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue