From 48d24d72e6f0d9797cd69c37c8cb8e1a9fdda7d0 Mon Sep 17 00:00:00 2001 From: "Jerry (Xinyu Hou)" Date: Thu, 28 Apr 2016 07:16:40 -0700 Subject: [PATCH] Proofread internal information after retranslating UI #4836 --- src/gui/src/MainWindow.cpp | 11 ++++++++++- src/gui/src/MainWindow.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index a05210d9..af72437e 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -491,6 +491,15 @@ void MainWindow::restartSynergy() startSynergy(); } +void MainWindow::proofreadInfo() +{ + setEdition(m_AppConfig.edition()); + + int oldState = m_SynergyState; + m_SynergyState = synergyDisconnected; + setSynergyState((qSynergyState)oldState); +} + void MainWindow::clearLog() { m_pLogOutput->clear(); @@ -958,7 +967,7 @@ void MainWindow::changeEvent(QEvent* event) retranslateUi(this); retranslateMenuBar(); - setEdition(m_AppConfig.edition()); + proofreadInfo(); break; } diff --git a/src/gui/src/MainWindow.h b/src/gui/src/MainWindow.h index 9c7aeebc..da06c2e7 100644 --- a/src/gui/src/MainWindow.h +++ b/src/gui/src/MainWindow.h @@ -178,6 +178,7 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase bool autoHide(); QString getTimeStamp(); void restartSynergy(); + void proofreadInfo(); private: QSettings& m_Settings;