From 90365041f463f6c062b154e94fedbf75f96fb880 Mon Sep 17 00:00:00 2001 From: Tannin Date: Tue, 12 May 2015 18:56:44 +0200 Subject: workaround to prevent repeated checking of mods with the mouse was interpreted as double click --- src/mainwindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5a2ef6fd..44ccc642 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2538,6 +2538,12 @@ void MainWindow::on_modList_doubleClicked(const QModelIndex &index) if (!index.isValid()) { return; } + + if (m_OrganizerCore.modList()->timeElapsedSinceLastChecked() <= QApplication::doubleClickInterval()) { + // don't interpret double click if we only just checked a mod + return; + } + QModelIndex sourceIdx = mapToModel(m_OrganizerCore.modList(), index); if (!sourceIdx.isValid()) { return; @@ -2545,7 +2551,6 @@ void MainWindow::on_modList_doubleClicked(const QModelIndex &index) try { m_ContextRow = m_ModListSortProxy->mapToSource(index).row(); -// displayModInformation(m_ModListSortProxy->mapToSource(index).row()); displayModInformation(sourceIdx.row()); // workaround to cancel the editor that might have opened because of // selection-click -- cgit v1.3.1