double click on widgets only works now with left mouse button

This commit is contained in:
Rafael 2016-04-02 21:21:26 +02:00
parent 5c4f390bd2
commit d2baaa961e
3 changed files with 17 additions and 9 deletions

View file

@ -82,6 +82,8 @@ void SavegameWidget::mouseDoubleClickEvent(QMouseEvent *ev)
{
QWidget::mouseDoubleClickEvent(ev);
if (ev->button() == Qt::LeftButton)
{
SavegameDialog *savegameDialog = new SavegameDialog(this);
savegameDialog->setWindowFlags(savegameDialog->windowFlags()^Qt::WindowContextHelpButtonHint);
savegameDialog->setSavegameData(sgdata, sgdPath, true);
@ -91,3 +93,4 @@ void SavegameWidget::mouseDoubleClickEvent(QMouseEvent *ev)
savegameDialog->deleteLater();
delete savegameDialog;
}
}

View file

@ -19,6 +19,7 @@
#ifndef SAVEGAMEWIDGET_H
#define SAVEGAMEWIDGET_H
#include <QMouseEvent>
#include <QWidget>
#include "SavegameData.h"

View file

@ -93,5 +93,9 @@ void SnapmaticWidget::on_cmdDelete_clicked()
void SnapmaticWidget::mouseDoubleClickEvent(QMouseEvent *ev)
{
QWidget::mouseDoubleClickEvent(ev);
if (ev->button() == Qt::LeftButton)
{
on_cmdView_clicked();
}
}