From ab6e93f4d8abe9470c434089bd01089815f8a7bb Mon Sep 17 00:00:00 2001 From: auria Date: Sat, 12 Jun 2010 22:41:37 +0000 Subject: [PATCH] Bugfix: initially shown highscores were wrong git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5505 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/states_screens/dialogs/track_info_dialog.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/states_screens/dialogs/track_info_dialog.cpp b/src/states_screens/dialogs/track_info_dialog.cpp index a3056eebc..5dac1b751 100644 --- a/src/states_screens/dialogs/track_info_dialog.cpp +++ b/src/states_screens/dialogs/track_info_dialog.cpp @@ -61,14 +61,8 @@ TrackInfoDialog::TrackInfoDialog(const std::string& trackIdent, const irr::core: m_irrlicht_window); a->setTabStop(false); - // ---- High Scores const int hscores_y_from = y1; const int hscores_y_to = y1 + (y2 - y1)*2/3; - if (has_highscores) - { - addHighScoreWidgets(hscores_y_from, hscores_y_to); - updateHighScores(); - } // ---- Track credits Track* track = track_manager->getTrack(trackIdent); @@ -153,6 +147,16 @@ TrackInfoDialog::TrackInfoDialog(const std::string& trackIdent, const irr::core: okBtn->getIrrlichtElement()->setTabStop(true); okBtn->getIrrlichtElement()->setTabGroup(false); + // ---- High Scores + if (has_highscores) + { + addHighScoreWidgets(hscores_y_from, hscores_y_to); + const int num_laps = m_spinner->getValue(); + race_manager->setNumLaps(num_laps); + updateHighScores(); + } + + okBtn->setFocusForPlayer( PLAYER_ID_GAME_MASTER ); }