Fixed race condition for updating zeroconf service

This commit is contained in:
Xinyu Hou 2014-11-19 16:29:30 +00:00
parent 56b3231a6c
commit 471e198efc
1 changed files with 6 additions and 2 deletions

View File

@ -833,13 +833,17 @@ void MainWindow::serverDetected(const QString name)
void MainWindow::on_m_pGroupClient_toggled(bool on) void MainWindow::on_m_pGroupClient_toggled(bool on)
{ {
m_pGroupServer->setChecked(!on); m_pGroupServer->setChecked(!on);
updateZeroconfService(); if (on) {
updateZeroconfService();
}
} }
void MainWindow::on_m_pGroupServer_toggled(bool on) void MainWindow::on_m_pGroupServer_toggled(bool on)
{ {
m_pGroupClient->setChecked(!on); m_pGroupClient->setChecked(!on);
updateZeroconfService(); if (on) {
updateZeroconfService();
}
} }
bool MainWindow::on_m_pButtonBrowseConfigFile_clicked() bool MainWindow::on_m_pButtonBrowseConfigFile_clicked()