Skip to content

Commit cdabdfa

Browse files
committed
GUI/StatReporter: Fix the order of the stats not being proper
Dirty hacks, but meh.
1 parent 01f5f67 commit cdabdfa

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Source/GUI/StatsReporter/StatsReporterWidget.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ void StatsReporterWidget::gameChanged(const GUICommon::gameSelection game)
112112
if (game == GUICommon::gameSelection::Unselected)
113113
return;
114114

115+
m_currentGame = game;
116+
115117
reset();
116118
m_cmbSecondaryPokemon->disconnect();
117119

@@ -152,8 +154,15 @@ void StatsReporterWidget::startersPredictionChanged(
152154
reset();
153155
updateStatsSelection();
154156

155-
for (int i = 0; i < m_starterFrames.size(); i++)
156-
m_starterFrames[i]->setPokemonProperties(starters.starters[i]);
157+
if (m_currentGame == GUICommon::gameSelection::Colosseum)
158+
{
159+
m_starterFrames[0]->setPokemonProperties(starters.starters[1]);
160+
m_starterFrames[1]->setPokemonProperties(starters.starters[0]);
161+
}
162+
else
163+
{
164+
m_starterFrames[0]->setPokemonProperties(starters.starters[0]);
165+
}
157166

158167
m_startingSeed = starters.startingSeed;
159168

Source/GUI/StatsReporter/StatsReporterWidget.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ class StatsReporterWidget : public QWidget
5151
QVector<PokemonPropertiesFrame*> m_starterFrames;
5252
std::vector<BaseRNGSystem::SecondaryCandidate> m_filteredCandidates;
5353
PokemonPropertiesFrame* m_secondaryFrame;
54+
GUICommon::gameSelection m_currentGame = GUICommon::gameSelection::Unselected;
5455
};

0 commit comments

Comments
 (0)