summaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 27d99d1..0ed85b8 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -213,6 +213,7 @@ void MainWindow::mouseDoubleClickEvent(QMouseEvent *)
if (m_Snake == nullptr) {
if (clicks++ > 0) {
m_Snake = new GameCore(this);
+ m_Clock->parentWidget()->hide();
}
} else {
m_Snake->addSnake();
@@ -224,6 +225,7 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
switch (event->key()) {
case Qt::Key_Escape:
if (m_Snake != nullptr) {
+ m_Clock->parentWidget()->show();
delete m_Snake;
m_Snake = nullptr;
}