Fixed an issue where hidden metadata fields would sometimes be shown.

This commit is contained in:
Leon Styhre 2020-10-10 15:13:47 +02:00
parent 2aad71a3c3
commit 7832c4fbe0
3 changed files with 8 additions and 3 deletions

View file

@ -123,7 +123,6 @@ DetailedGameListView::DetailedGameListView(
initMDLabels(); initMDLabels();
initMDValues(); initMDValues();
updateInfoPanel();
} }
void DetailedGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme) void DetailedGameListView::onThemeChanged(const std::shared_ptr<ThemeData>& theme)
@ -391,3 +390,9 @@ std::vector<GuiComponent*> DetailedGameListView::getMDValues()
ret.push_back(&mPlayCount); ret.push_back(&mPlayCount);
return ret; return ret;
} }
void DetailedGameListView::onShow()
{
GuiComponent::onShow();
updateInfoPanel();
}

View file

@ -19,10 +19,9 @@ class DetailedGameListView : public BasicGameListView
public: public:
DetailedGameListView(Window* window, FileData* root); DetailedGameListView(Window* window, FileData* root);
virtual void onShow() override;
virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override; virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override;
virtual const char* getName() const override { return "detailed"; } virtual const char* getName() const override { return "detailed"; }
virtual void launch(FileData* game) override; virtual void launch(FileData* game) override;
private: private:

View file

@ -249,6 +249,7 @@ void VideoGameListView::initMDValues()
values[i]->setDefaultZIndex(40); values[i]->setDefaultZIndex(40);
float testBot = values[i]->getPosition().y() + values[i]->getSize().y(); float testBot = values[i]->getPosition().y() + values[i]->getSize().y();
if (testBot > bottom) if (testBot > bottom)
bottom = testBot; bottom = testBot;
} }