From 4aa94a353224c14265446276277a91339f2e415d Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 16 Apr 2009 11:33:54 +0200 Subject: BT: Mac: QtDemo is really sluggish when opening menus This has to do with coalesced updates. The easy fix for now is to fix QtDemo itself, meaning: always use a steady timer for redrawing the viewport of the graphics view (as opposed to let each item on screen calling update whenever they move) Task-number: 250667 Reviewed-by: Trenton Schulz --- demos/qtdemo/colors.cpp | 3 +++ demos/qtdemo/menumanager.cpp | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp index 18343cb..41bbfb3 100644 --- a/demos/qtdemo/colors.cpp +++ b/demos/qtdemo/colors.cpp @@ -278,6 +278,9 @@ void Colors::parseArgs(int argc, char *argv[]) + "[-low] [-ticker-letters] [-ticker-speed] [-no-ticker-morph] " + "[-ticker-morph-speed] [-ticker-text]"); exit(0); + } else{ + QMessageBox::warning(0, "QtDemo", QString("Unrecognized argument:\n") + s); + exit(0); } } diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp index bfa2e3f..a9e9b4b 100644 --- a/demos/qtdemo/menumanager.cpp +++ b/demos/qtdemo/menumanager.cpp @@ -184,7 +184,6 @@ void MenuManager::itemSelected(int userCode, const QString &menuName) this->tickerInAnim->startDelay = 2000; this->ticker->useGuideQt(); this->score->queueMovie("ticker", Score::NEW_ANIMATION_ONLY); - this->window->switchTimerOnOff(true); } break; case MENU1: @@ -220,7 +219,6 @@ void MenuManager::itemSelected(int userCode, const QString &menuName) this->score->queueMovie(this->currentInfo + " -buttons", Score::NEW_ANIMATION_ONLY); if (!Colors::noTicker){ this->score->queueMovie("ticker -out", Score::NEW_ANIMATION_ONLY); - this->window->switchTimerOnOff(false); } break; case UP:{ @@ -257,7 +255,6 @@ void MenuManager::itemSelected(int userCode, const QString &menuName) this->ticker->doIntroTransitions = false; this->tickerInAnim->startDelay = 500; this->score->queueMovie("ticker", Score::NEW_ANIMATION_ONLY); - this->window->switchTimerOnOff(true); } } else if (this->currentMenuCode != ROOT) itemSelected(ROOT, Colors::rootMenuName); -- cgit v0.12