Skip to content

Commit a340791

Browse files
committed
Update GameListWidget.cpp
1 parent 5fd531b commit a340791

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

pcsx2-qt/GameList/GameListWidget.cpp

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,32 @@ void GameListWidget::initialize()
294294
if (Host::ContainsBaseSettingValue("GameListTableView", "HeaderState"))
295295
{
296296
loadTableHeaderState();
297-
ensureMinimumOneColumnVisible();
297+
298+
// Enforce at least one column is visible immediately after loading.
299+
// If the loaded config has everything hidden, force the Title column to show.
300+
QHeaderView* header = m_table_view->horizontalHeader();
301+
if (header)
302+
{
303+
bool any_visible = false;
304+
for (int column = 0; column < GameListModel::Column_Count; column++)
305+
{
306+
if (column != GameListModel::Column_Cover && !header->isSectionHidden(column))
307+
{
308+
any_visible = true;
309+
break;
310+
}
311+
}
312+
313+
if (!any_visible)
314+
{
315+
// Force the Title column (logical index 2) to be visible. When there is none, Qt by default will hide everything
316+
// So avoiding ghost columns, just enforce the Title one if it sees none.
317+
// This ensures there is a right-click menu possible to restore other columns via Reset All Columns
318+
// or manually checking 1 by 1 and dragging and dropping the columns for the order itself.
319+
header->setSectionHidden(GameListModel::Column_Title, false);
320+
onTableHeaderStateChanged();
321+
}
322+
}
298323
}
299324
else
300325
{

0 commit comments

Comments
 (0)