Commit 0de4ca2a authored by Daniel Fichtner's avatar Daniel Fichtner Committed by Albert Astals Cid
Browse files

Start new deal when double clicking after game is won

BUG: 422825
parent e4dbde72
......@@ -1075,9 +1075,15 @@ void DealerScene::mouseReleaseEvent( QGraphicsSceneMouseEvent * e )
void DealerScene::mouseDoubleClickEvent( QGraphicsSceneMouseEvent * e )
{
stop();
KCardScene::mouseDoubleClickEvent( e );
if ( !m_dealHasBeenWon )
{
stop();
KCardScene::mouseDoubleClickEvent( e );
}
else
{
Q_EMIT newDeal();
}
}
......
......@@ -135,6 +135,7 @@ Q_SIGNALS:
void updateMoves(int moves);
void solverStateChanged(const QString &text);
void newDeal();
void cardsPickedUp();
void cardsPutDown();
......
......@@ -622,6 +622,8 @@ void MainWindow::updateActions()
connect(m_downAction, &QAction::triggered, m_dealer, &DealerScene::keyboardFocusDown);
connect(m_cancelAction, &QAction::triggered, m_dealer, &DealerScene::keyboardFocusCancel);
connect(m_pickUpSetDownAction, &QAction::triggered, m_dealer, &DealerScene::keyboardFocusSelect);
connect(m_dealer, &DealerScene::newDeal, this, &MainWindow::newGame);
if ( m_dealer->actions() & DealerScene::Draw )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment