From 917c75026f05b3b1f81503ed43352febb631f796 Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Mon, 1 Dec 2014 11:22:42 +0000 Subject: [PATCH] Show add client dialog only if main window is active #4230 --- src/gui/src/ServerConfig.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gui/src/ServerConfig.cpp b/src/gui/src/ServerConfig.cpp index 67f64610..6b0a890e 100644 --- a/src/gui/src/ServerConfig.cpp +++ b/src/gui/src/ServerConfig.cpp @@ -372,10 +372,14 @@ bool ServerConfig::fixNoServer(const QString& name, int& index) int ServerConfig::showAddClientDialog(const QString& clientName) { - AddClientDialog addClientDialog(clientName, m_pMainWindow); - addClientDialog.exec(); - int result = addClientDialog.addResult(); - m_IgnoreAutoConfigClient = addClientDialog.ignoreAutoConfigClient(); + int result = kAddClientIgnore; + + if (m_pMainWindow->isActiveWindow()) { + AddClientDialog addClientDialog(clientName, m_pMainWindow); + addClientDialog.exec(); + result = addClientDialog.addResult(); + m_IgnoreAutoConfigClient = addClientDialog.ignoreAutoConfigClient(); + } return result; }