Fix typo n Next Song button

This commit is contained in:
Gary Talent 2021-10-24 11:06:20 -05:00
parent b0eeb81592
commit f9122c2942
3 changed files with 4 additions and 1 deletions

View File

@ -29,7 +29,7 @@ MainWindow::MainWindow(QWidget *parent): QMainWindow(parent) {
const auto btnPrevSong = new QPushButton(tr("Previous Song (Left)"), this); const auto btnPrevSong = new QPushButton(tr("Previous Song (Left)"), this);
const auto btnPrevSlide = new QPushButton(tr("Previous Slide (Up)"), this); const auto btnPrevSlide = new QPushButton(tr("Previous Slide (Up)"), this);
const auto btnNextSlide = new QPushButton(tr("Next Slide (Down)"), this); const auto btnNextSlide = new QPushButton(tr("Next Slide (Down)"), this);
const auto btnNextSong = new QPushButton(tr("Next Song (Right))"), this); const auto btnNextSong = new QPushButton(tr("Next Song (Right)"), this);
const auto btnBlankSlides = new QPushButton(tr("Blank Slides (,)"), this); const auto btnBlankSlides = new QPushButton(tr("Blank Slides (,)"), this);
const auto btnShowSlides = new QPushButton(tr("Show Slides (.)"), this); const auto btnShowSlides = new QPushButton(tr("Show Slides (.)"), this);
controlsLayout->addWidget(btnPrevSlide, 0, 0); controlsLayout->addWidget(btnPrevSlide, 0, 0);
@ -71,6 +71,7 @@ MainWindow::MainWindow(QWidget *parent): QMainWindow(parent) {
connect(btnObsShowSlides, &QPushButton::clicked, &m_openlpClient, &OpenLPClient::showSlides); connect(btnObsShowSlides, &QPushButton::clicked, &m_openlpClient, &OpenLPClient::showSlides);
// setup status bar // setup status bar
setStatusBar(new QStatusBar(this)); setStatusBar(new QStatusBar(this));
connect(&m_openlpClient, &OpenLPClient::songChanged, this, &MainWindow::refreshStatusBar);
connect(&m_openlpClient, &OpenLPClient::pollUpdate, this, &MainWindow::openLpConnectionInit); connect(&m_openlpClient, &OpenLPClient::pollUpdate, this, &MainWindow::openLpConnectionInit);
connect(&m_obsClient, &OBSClient::pollUpdate, this, &MainWindow::obsConnectionInit); connect(&m_obsClient, &OBSClient::pollUpdate, this, &MainWindow::obsConnectionInit);
refreshStatusBar(); refreshStatusBar();

View File

@ -117,6 +117,7 @@ void OpenLPClient::handlePollResponse(QNetworkReply *reply) {
if (m_currentSongId != songId) { if (m_currentSongId != songId) {
requestSlideList(); requestSlideList();
m_currentSongId = songId; m_currentSongId = songId;
emit songChanged(songId);
} }
emit pollUpdate(m_songNameMap[songId], slide); emit pollUpdate(m_songNameMap[songId], slide);
} }

View File

@ -80,5 +80,6 @@ class OpenLPClient: public QObject {
void slideListUpdate(QStringList, QStringList); void slideListUpdate(QStringList, QStringList);
void songChanged(QString);
}; };