diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 7e9e8744..dc367b95 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -914,6 +914,7 @@ void MainWindow::synergyFinished(int exitCode, QProcess::ExitStatus) if (m_ExpectedRunningState == kStarted) { QTimer::singleShot(1000, this, SLOT(startSynergy())); appendLogInfo(QString("detected process not running, auto restarting")); + setSynergyState(synergyPendingRetry); } else { setSynergyState(synergyDisconnected); @@ -932,7 +933,7 @@ void MainWindow::setSynergyState(qSynergyState state) if (synergyState() == state) return; - if ((state == synergyConnected) || (state == synergyListening)) + if ((state == synergyConnected) || (state == synergyConnecting) || (state == synergyListening) || (state == synergyPendingRetry)) { disconnect (m_pButtonToggleStart, SIGNAL(clicked()), m_pActionStartSynergy, SLOT(trigger())); connect (m_pButtonToggleStart, SIGNAL(clicked()), m_pActionStopSynergy, SLOT(trigger())); diff --git a/src/gui/src/MainWindow.h b/src/gui/src/MainWindow.h index e267ccf2..035252b9 100644 --- a/src/gui/src/MainWindow.h +++ b/src/gui/src/MainWindow.h @@ -73,7 +73,8 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase synergyDisconnected, synergyConnecting, synergyConnected, - synergyListening + synergyListening, + synergyPendingRetry }; enum qSynergyType