diff options
| author | Al <gabriel.cortesi@outlook.com> | 2019-05-26 15:03:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-26 15:03:53 +0200 |
| commit | 622908ee20ae5d74bff6524ff7c8eb044e25238b (patch) | |
| tree | f24a6eb32da936f97baf6d2b44bc286ce88789a2 /src | |
| parent | 1c87bdab35c7559ac393ccb6f6a54b769b12a64c (diff) | |
| parent | d0f087be8fa37fdfee94fad60260831bf64a1dda (diff) | |
Merge pull request #735 from isanae/hover-activate-700
don't activate the window when hovering save files
Diffstat (limited to 'src')
| -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(); } |
