From c25705c50f25c77592ff1ab99521133bf18418f2 Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 2 Oct 2018 19:52:52 +1300 Subject: [PATCH] auto refresh devices on popup --- trayicon.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trayicon.cpp b/trayicon.cpp index 4dd4ee4..bced9d1 100644 --- a/trayicon.cpp +++ b/trayicon.cpp @@ -37,6 +37,9 @@ TrayIcon::TrayIcon(QObject *parent) : // Need to use BlockingQueuedConnection to pull items off pulseaudio thread before it reallocates them connect(&this->pulse, &QPulse::GotCardInfoList, this, &TrayIcon::onGotPulseCardInfo, Qt::BlockingQueuedConnection); + // Immediately refresh when popup is shown (normal right-click event), so that data always seems live + connect(this->menu, &QMenu::aboutToShow, this, &TrayIcon::refreshData); + refreshData(); }