When the game list is empty the placeholder page is shown, and showGameList()/
showGameGrid() returned early before persisting the GameListGridView setting, so
toggling the view had no effect. updateToolbar() also derived the button state
from the current stack index, which is always the placeholder page when empty,
so the toolbar never reflected the selected mode.
Persist the preference before the early-out and base the toolbar state on the
saved setting, so switching views works (and is remembered for when games are
added) even while the list is empty.
Fixes#13220
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Remove the less useful comments and revise others + change the lambda (it had for loops and visibility checks and the brackets [ ](){ ... } ) and move the logic function into the named function of ensureMinimumOneColumnVisible()
Remove unused variable and reset scope to older variant.
Add helper function that checks if it was already broken to reset it automatically to the default columns.
Also add to initialise check from the ini-side so it checks in both ways to ensure it works properly. There is another fallback that it will atleast set the Title Column to be available if all others were unchecked so you can reset and change however you want.
There is an issue when an user right-clicks on the columns such as Title or the others; and they uncheck every single option it will make everything disappear visually for the user.
Barring the user to have access to order, disable or even add columns such as File Title which isn't part of the default. Another consequence is that it will hide ALL games until they reset or go to the PCSX2.ini and delete the headerstate entry which isn't user-friendly.
Drag and drop columns still work and a bit less spam in look-up when not needed as small optimisation.
Qt: Make sure custom background aren't active when game list isn't shown
To save on CPU Power and be more efficient
Co-Authored-By: TheLastRar <[email protected]>