Skip to content

Commit

Permalink
Fixed|UI|Home: Changing profile packages will update save list
Browse files Browse the repository at this point in the history
Compatibility with savegames depends on the profile’s packages.
  • Loading branch information
skyjake committed Mar 4, 2017
1 parent 6254895 commit 4445822
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Expand Up @@ -49,6 +49,7 @@ class GamePanelButtonWidget : public PanelButtonWidget
public slots:
void play();
void selectPackages();
void clearPackages();

protected slots:
void saveSelected(de::ui::DataPos savePos);
Expand Down
5 changes: 2 additions & 3 deletions doomsday/apps/client/src/ui/home/gamecolumnwidget.cpp
Expand Up @@ -388,10 +388,9 @@ DENG_GUI_PIMPL(GameColumnWidget)

// Items suitable for all types of profiles.
popup->items()
<< new ui::ActionItem(tr("Clear Packages"), new CallbackAction([this, profileItem] ()
<< new ui::ActionItem(tr("Clear Packages"), new CallbackAction([this, button] ()
{
profileItem->profile->setPackages(StringList());
profileItem->update();
button->clearPackages();
}))
<< new ui::ActionItem(tr("Duplicate"), new CallbackAction([this, profileItem] ()
{
Expand Down
8 changes: 8 additions & 0 deletions doomsday/apps/client/src/ui/home/gamepanelbuttonwidget.cpp
Expand Up @@ -117,6 +117,7 @@ DENG_GUI_PIMPL(GamePanelButtonWidget)
{
updateGameTitleImage();
}
savedItems.refilter();
});

playButton = new ButtonWidget;
Expand Down Expand Up @@ -352,6 +353,13 @@ void GamePanelButtonWidget::selectPackages()
d->packagesButton->trigger();
}

void GamePanelButtonWidget::clearPackages()
{
d->gameProfile.setPackages(StringList());
d->savedItems.refilter();
updateContent();
}

void GamePanelButtonWidget::saveSelected(de::ui::DataPos savePos)
{
if (savePos != ui::Data::InvalidPos)
Expand Down

0 comments on commit 4445822

Please sign in to comment.