diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-26 08:50:13 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-26 08:50:13 -0400 |
| commit | d0f087be8fa37fdfee94fad60260831bf64a1dda (patch) | |
| tree | f24a6eb32da936f97baf6d2b44bc286ce88789a2 /src/mainwindow.cpp | |
| parent | 1c87bdab35c7559ac393ccb6f6a54b769b12a64c (diff) | |
don't activate the window when hovering save files
don't popup the widget if the window doesn't have focus
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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<void *>(newItem))); - - ui->savegameList->activateWindow(); } |
