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
This commit is contained in:
auria 2010-06-12 22:41:37 +00:00
parent 4b59846be0
commit ab6e93f4d8

View File

@ -61,14 +61,8 @@ TrackInfoDialog::TrackInfoDialog(const std::string& trackIdent, const irr::core:
m_irrlicht_window); m_irrlicht_window);
a->setTabStop(false); a->setTabStop(false);
// ---- High Scores
const int hscores_y_from = y1; const int hscores_y_from = y1;
const int hscores_y_to = y1 + (y2 - y1)*2/3; const int hscores_y_to = y1 + (y2 - y1)*2/3;
if (has_highscores)
{
addHighScoreWidgets(hscores_y_from, hscores_y_to);
updateHighScores();
}
// ---- Track credits // ---- Track credits
Track* track = track_manager->getTrack(trackIdent); 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()->setTabStop(true);
okBtn->getIrrlichtElement()->setTabGroup(false); 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 ); okBtn->setFocusForPlayer( PLAYER_ID_GAME_MASTER );
} }