From cb02578a9e8ea351f326eb4b716e1e1a953886b3 Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Thu, 18 Feb 2021 11:27:44 +0200 Subject: [PATCH] fix - Hide/show tray icon makes duplicates in the tray menu (cherry picked from commit 93e3a125be3602f2fd95d02fb0e11f11b1f059be) --- src/core/controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/controller.cpp b/src/core/controller.cpp index 55b477d6..9ca21c41 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -393,6 +393,7 @@ void Controller::openLauncherWindow() void Controller::enableTrayIcon() { if (m_trayIcon) { + m_trayIcon->show(); return; } if (nullptr == m_trayIconMenu) { @@ -519,7 +520,7 @@ void Controller::disableTrayIcon() { #if defined(Q_OS_LINUX) || defined(Q_OS_UNIX) if (m_trayIcon) { - m_trayIcon->deleteLater(); + m_trayIcon->hide(); } ConfigHandler().setDisabledTrayIcon(true); #endif