fix - 'Show tray icon' checkbox is automatically unchecked when checking some other checkboxes

(cherry picked from commit 3803f6725d3d7f95f36299a65557f5bfb2d15f2a)
This commit is contained in:
Yuriy Puchkov
2021-02-24 16:33:25 +02:00
parent 39dcd1a291
commit e3b1d55fd8
2 changed files with 4 additions and 6 deletions

View File

@@ -382,6 +382,7 @@ void Controller::openLauncherWindow()
void Controller::enableTrayIcon()
{
ConfigHandler().setDisabledTrayIcon(false);
if (m_trayIcon) {
m_trayIcon->show();
return;
@@ -391,7 +392,6 @@ void Controller::enableTrayIcon()
Q_ASSERT(m_trayIconMenu);
}
ConfigHandler().setDisabledTrayIcon(false);
QAction* captureAction = new QAction(tr("&Take Screenshot"), this);
connect(captureAction, &QAction::triggered, this, [this]() {
#if defined(Q_OS_MACOS)
@@ -508,7 +508,7 @@ void Controller::enableTrayIcon()
void Controller::disableTrayIcon()
{
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
#if defined(Q_OS_LINUX) || defined(Q_OS_UNIX) || defined(Q_OS_MACOS)
if (m_trayIcon) {
m_trayIcon->hide();
}