From d0f087be8fa37fdfee94fad60260831bf64a1dda Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Sun, 26 May 2019 08:50:13 -0400 Subject: don't activate the window when hovering save files don't popup the widget if the window doesn't have focus --- src/mainwindow.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 810caa01..0ef9bc80 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1025,6 +1025,15 @@ void MainWindow::setBrowserGeometry(const QByteArray &geometry) void MainWindow::displaySaveGameInfo(QListWidgetItem *newItem) { + // don't display the widget if the main window doesn't have focus + // + // this goes against the standard behaviour for tooltips, which are displayed + // on hover regardless of focus, but this widget is so large and busy that + // it's probably better this way + if (!isActiveWindow()){ + return; + } + QString const &save = newItem->data(Qt::UserRole).toString(); if (m_CurrentSaveView == nullptr) { IPluginGame const *game = m_OrganizerCore.managedGame(); @@ -1056,8 +1065,6 @@ void MainWindow::displaySaveGameInfo(QListWidgetItem *newItem) m_CurrentSaveView->show(); m_CurrentSaveView->setProperty("displayItem", qVariantFromValue(static_cast(newItem))); - - ui->savegameList->activateWindow(); } -- cgit v1.3.1