aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpmainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-01-16 23:46:05 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-01-16 23:46:05 +0800
commit63224bf7ac365b428e5115fc6ef6339a0b40c9fa (patch)
tree45d72410a3f19200945b304d4c20f03fc6cdc0f9 /qmidiplayer-desktop/qmpmainwindow.cpp
parentf7f2e9039cfd6c3d07a28137e321fa96b0267084 (diff)
downloadQMidiPlayer-63224bf7ac365b428e5115fc6ef6339a0b40c9fa.tar.xz
Seeking while paused no longer breaks playback completely.
"main.seek" callbacks are now invoked after the player has done seeking, fixing incorrect channel info in simple visualization after seeking. Use QT_STRINGIFY.
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index 1df2d8e..94185c7 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -413,7 +413,6 @@ void qmpMainWindow::on_hsTimer_sliderPressed()
void qmpMainWindow::on_hsTimer_sliderReleased()
{
dragging=false;
- invokeCallback("main.seek",nullptr);
if(playing)
{
if(ui->hsTimer->value()==100){on_pbNext_clicked();return;}
@@ -431,6 +430,7 @@ void qmpMainWindow::on_hsTimer_sliderReleased()
sprintf(ts,"%02d:%02d",(int)(offset)/60,(int)(offset)%60);
ui->lbCurTime->setText(ts);
}
+ invokeCallback("main.seek",nullptr);
}
uint32_t qmpMainWindow::getPlaybackPercentage(){return ui->hsTimer->value();}