From 6358629269220029a891f2b4ad5f3c03ecedf21c Mon Sep 17 00:00:00 2001 From: Gres Date: Wed, 30 Sep 2015 21:05:02 +0300 Subject: [PATCH] Show "Copied to clipboard" message only when copying after tray icon click. --- Manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Manager.cpp b/Manager.cpp index bc84b3c..d884264 100644 --- a/Manager.cpp +++ b/Manager.cpp @@ -261,6 +261,9 @@ void Manager::processTrayAction (QSystemTrayIcon::ActivationReason reason) { } else if (reason == QSystemTrayIcon::MiddleClick && clipboardAction_->isEnabled ()) { copyLastToClipboard (); + trayIcon_->showMessage (tr ("Результат"), + tr ("Последний результат был скопирован в буфер обмена."), + QSystemTrayIcon::Information); } else if (reason == QSystemTrayIcon::DoubleClick && repeatCaptureAction_->isEnabled ()) { repeatCapture (); @@ -283,9 +286,6 @@ void Manager::copyLastToClipboard () { message += " - " + item.translated; } clipboard->setText (message); - trayIcon_->showMessage (tr ("Результат"), - tr ("Последний результат был скопирован в буфер обмена."), - QSystemTrayIcon::Information); } }