auto refresh devices on popup

This commit is contained in:
mappu 2018-10-02 19:52:52 +13:00
parent a2c0ecef83
commit c25705c50f
1 changed files with 3 additions and 0 deletions

View File

@ -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();
}