When multi-scraping and scrolling a long name, the start position would sometimes not reset correctly.

This commit is contained in:
Leon Styhre 2022-01-15 19:28:41 +01:00
parent c2619fd520
commit 89cf82b88e
2 changed files with 6 additions and 3 deletions

View file

@ -598,6 +598,7 @@ bool GuiScraperSearch::input(InputConfig* config, Input input)
if (config->isMappedTo("a", input) && input.value != 0) {
if (mBlockAccept || mScraperResults.empty())
return true;
mResultList->setLoopRows(false);
}
// Check whether we should allow a refine of the game name.
@ -646,8 +647,6 @@ void GuiScraperSearch::render(const glm::mat4& parentTrans)
void GuiScraperSearch::returnResult(ScraperSearchResult result)
{
mResultList->setLoopRows(false);
mBlockAccept = true;
mAcceptedResult = true;

View file

@ -87,7 +87,11 @@ public:
float getRowHeight(int row) const { return getRowHeight(mEntries.at(row).data); }
// Horizontal looping for row content that doesn't fit on-screen.
void setLoopRows(bool state) { mLoopRows = state; }
void setLoopRows(bool state)
{
stopLooping();
mLoopRows = state;
}
void stopLooping()
{
mLoopOffset = 0;