Remove double clicking. It somehow segfaults.....

This commit is contained in:
ArsenArsen 2017-05-01 11:47:00 +02:00
parent e43aa8d201
commit 1fa9c3e8d5
2 changed files with 2 additions and 8 deletions

View File

@ -110,11 +110,6 @@ void CropScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *e)
prevButtons = Qt::NoButton;
}
void CropScene::keyReleaseEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) done();
}
void CropScene::addDrawingAction(QMenu &menu, DrawItem *item)
{
QAction *action = new QAction;
@ -141,9 +136,9 @@ void CropScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *e)
e->accept();
}
void CropScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *)
void CropScene::keyReleaseEvent(QKeyEvent *event)
{
done();
if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) done(); // Segfault
}
void CropScene::done()

View File

@ -30,7 +30,6 @@ class CropScene : public QGraphicsScene
protected:
void mouseMoveEvent(QGraphicsSceneMouseEvent *e) override;
void mouseReleaseEvent(QGraphicsSceneMouseEvent *e) override;
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e) override;
void contextMenuEvent(QGraphicsSceneContextMenuEvent *e) override;
void keyReleaseEvent(QKeyEvent *e) override;