summaryrefslogtreecommitdiffstats
path: root/demos/qtdemo/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'demos/qtdemo/mainwindow.cpp')
-rw-r--r--demos/qtdemo/mainwindow.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp
index 0da69b222e..858d389722 100644
--- a/demos/qtdemo/mainwindow.cpp
+++ b/demos/qtdemo/mainwindow.cpp
@@ -185,7 +185,6 @@ void MainWindow::switchTimerOnOff(bool on)
if (on && !Colors::noTimerUpdate){
this->useTimer = true;
- this->setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
this->fpsTime = QTime::currentTime();
this->updateTimer.start(int(1000 / Colors::fps));
}
@@ -257,10 +256,6 @@ void MainWindow::tick()
if (MenuManager::instance()->ticker)
MenuManager::instance()->ticker->tick();
- this->viewport()->update();
- if (Colors::softwareRendering)
- QApplication::syncX();
-
if (this->useTimer)
this->updateTimer.start(int(1000 / Colors::fps));
}
@@ -428,9 +423,7 @@ void MainWindow::focusInEvent(QFocusEvent *)
if (MenuManager::instance()->ticker)
MenuManager::instance()->ticker->pause(false);
- int code = MenuManager::instance()->currentMenuCode;
- if (code == MenuManager::ROOT || code == MenuManager::MENU1)
- this->switchTimerOnOff(true);
+ this->switchTimerOnOff(true);
this->pausedLabel->setRecursiveVisible(false);
}
@@ -443,9 +436,7 @@ void MainWindow::focusOutEvent(QFocusEvent *)
if (MenuManager::instance()->ticker)
MenuManager::instance()->ticker->pause(true);
- int code = MenuManager::instance()->currentMenuCode;
- if (code == MenuManager::ROOT || code == MenuManager::MENU1)
- this->switchTimerOnOff(false);
+ this->switchTimerOnOff(false);
this->pausedLabel->setRecursiveVisible(true);
}