Skip to content

Commit

Permalink
Fixed|UI|Home: Game profiles listed in duplicate after launching
Browse files Browse the repository at this point in the history
On the first launch, game profiles are populated based on the
available games, and it was possible that this operation was done
twice if the games are immediately playable.

IssueID #2203
  • Loading branch information
skyjake committed Feb 22, 2017
1 parent 007c76b commit cce4c7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doomsday/apps/client/src/ui/home/gamecolumnwidget.cpp
Expand Up @@ -145,7 +145,6 @@ DENG_GUI_PIMPL(GameColumnWidget)
.setInput(Rule::Top, menu->rule().bottom());

DoomsdayApp::games().audienceForReadiness() += this;
DoomsdayApp::gameProfiles().audienceForAddition() += this;
Config::get("home.showUnplayableGames").audienceForChange() += this;
}

Expand Down Expand Up @@ -191,6 +190,7 @@ DENG_GUI_PIMPL(GameColumnWidget)
{
if (profile.game().family() == gameFamily)
{
DENG2_ASSERT(!findProfileItem(profile));
menu->items() << new ProfileItem(this, profile);
addOrRemoveSubheading();
return true;
Expand Down Expand Up @@ -326,6 +326,9 @@ DENG_GUI_PIMPL(GameColumnWidget)
menu->setSelectedIndex(restoredSelected);
restoredSelected = -1;
}

// Observe further additions one by one.
DoomsdayApp::gameProfiles().audienceForAddition() += this;
}

void variableValueChanged(Variable &, Value const &)
Expand Down

0 comments on commit cce4c7d

Please sign in to comment.