Dont allow pause while waiting for song
Some checks failed
Build eismuliplexer for linux / Build (push) Has been cancelled
Some checks failed
Build eismuliplexer for linux / Build (push) Has been cancelled
This commit is contained in:
parent
6ef8591769
commit
6be80f1d5c
2 changed files with 5 additions and 1 deletions
|
|
@ -242,7 +242,7 @@ void MainWindow::on_playButton_clicked()
|
||||||
|
|
||||||
void MainWindow::on_pauseButton_clicked()
|
void MainWindow::on_pauseButton_clicked()
|
||||||
{
|
{
|
||||||
if (isPlaying && !isPaused)
|
if (isPlaying && !isPaused && audioPlayer->isPlaying())
|
||||||
{
|
{
|
||||||
// Pause playback
|
// Pause playback
|
||||||
audioPlayer->pause();
|
audioPlayer->pause();
|
||||||
|
|
@ -408,6 +408,7 @@ void MainWindow::playSong(const SongItem& song)
|
||||||
ui->nowPlayingLabel->setText("Now Playing: " + song.caption);
|
ui->nowPlayingLabel->setText("Now Playing: " + song.caption);
|
||||||
ui->lyricsTextEdit->setPlainText(song.lyrics);
|
ui->lyricsTextEdit->setPlainText(song.lyrics);
|
||||||
ui->jsonTextEdit->setPlainText(song.json);
|
ui->jsonTextEdit->setPlainText(song.json);
|
||||||
|
updateControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::songGenerated(const SongItem& song)
|
void MainWindow::songGenerated(const SongItem& song)
|
||||||
|
|
|
||||||
|
|
@ -178,6 +178,9 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pauseButton">
|
<widget class="QPushButton" name="pauseButton">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Pause</string>
|
<string>Pause</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue