double click on widgets only works now with left mouse button
This commit is contained in:
parent
5c4f390bd2
commit
d2baaa961e
3 changed files with 17 additions and 9 deletions
|
@ -82,12 +82,15 @@ void SavegameWidget::mouseDoubleClickEvent(QMouseEvent *ev)
|
||||||
{
|
{
|
||||||
QWidget::mouseDoubleClickEvent(ev);
|
QWidget::mouseDoubleClickEvent(ev);
|
||||||
|
|
||||||
SavegameDialog *savegameDialog = new SavegameDialog(this);
|
if (ev->button() == Qt::LeftButton)
|
||||||
savegameDialog->setWindowFlags(savegameDialog->windowFlags()^Qt::WindowContextHelpButtonHint);
|
{
|
||||||
savegameDialog->setSavegameData(sgdata, sgdPath, true);
|
SavegameDialog *savegameDialog = new SavegameDialog(this);
|
||||||
savegameDialog->setModal(true);
|
savegameDialog->setWindowFlags(savegameDialog->windowFlags()^Qt::WindowContextHelpButtonHint);
|
||||||
savegameDialog->show();
|
savegameDialog->setSavegameData(sgdata, sgdPath, true);
|
||||||
savegameDialog->exec();
|
savegameDialog->setModal(true);
|
||||||
savegameDialog->deleteLater();
|
savegameDialog->show();
|
||||||
delete savegameDialog;
|
savegameDialog->exec();
|
||||||
|
savegameDialog->deleteLater();
|
||||||
|
delete savegameDialog;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#ifndef SAVEGAMEWIDGET_H
|
#ifndef SAVEGAMEWIDGET_H
|
||||||
#define SAVEGAMEWIDGET_H
|
#define SAVEGAMEWIDGET_H
|
||||||
|
|
||||||
|
#include <QMouseEvent>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "SavegameData.h"
|
#include "SavegameData.h"
|
||||||
|
|
||||||
|
|
|
@ -93,5 +93,9 @@ void SnapmaticWidget::on_cmdDelete_clicked()
|
||||||
void SnapmaticWidget::mouseDoubleClickEvent(QMouseEvent *ev)
|
void SnapmaticWidget::mouseDoubleClickEvent(QMouseEvent *ev)
|
||||||
{
|
{
|
||||||
QWidget::mouseDoubleClickEvent(ev);
|
QWidget::mouseDoubleClickEvent(ev);
|
||||||
on_cmdView_clicked();
|
|
||||||
|
if (ev->button() == Qt::LeftButton)
|
||||||
|
{
|
||||||
|
on_cmdView_clicked();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue