From 8d7f6e146daa60df429d1978f3c02b1fb7a2c88e Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Thu, 13 Nov 2014 16:22:44 +0000 Subject: [PATCH] Fixed startSynergy twice when detect the first server --- src/gui/src/MainWindow.cpp | 1 + src/gui/src/ZeroconfService.cpp | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index b11545ff..f9243e8f 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -820,6 +820,7 @@ void MainWindow::updateZeroconfService() void MainWindow::serverDetected(const QString name) { if (m_pComboServerList->findText(name) == -1) { + // Note: the first added item triggers startSynergy m_pComboServerList->addItem(name); } } diff --git a/src/gui/src/ZeroconfService.cpp b/src/gui/src/ZeroconfService.cpp index fec08447..0c1ea9cc 100644 --- a/src/gui/src/ZeroconfService.cpp +++ b/src/gui/src/ZeroconfService.cpp @@ -90,10 +90,6 @@ void ZeroconfService::clientDetected(const QList& list) record.serviceName)); m_pMainWindow->autoAddScreen(record.serviceName); } - - if (!list.isEmpty()) { - m_pMainWindow->startSynergy(); - } } void ZeroconfService::errorHandle(DNSServiceErrorType errorCode)