Qt/GameList: Fix search messing up columns
This commit is contained in:
parent
beeb6754d2
commit
1ec0a39cf1
|
@ -121,17 +121,7 @@ void GameList::MakeListView()
|
||||||
m_list->setColumnWidth(GameListModel::COL_SIZE, 85);
|
m_list->setColumnWidth(GameListModel::COL_SIZE, 85);
|
||||||
m_list->setColumnWidth(GameListModel::COL_ID, 70);
|
m_list->setColumnWidth(GameListModel::COL_ID, 70);
|
||||||
|
|
||||||
m_list->setColumnHidden(GameListModel::COL_PLATFORM, !SConfig::GetInstance().m_showSystemColumn);
|
UpdateColumnVisibility();
|
||||||
m_list->setColumnHidden(GameListModel::COL_BANNER, !SConfig::GetInstance().m_showBannerColumn);
|
|
||||||
m_list->setColumnHidden(GameListModel::COL_TITLE, !SConfig::GetInstance().m_showTitleColumn);
|
|
||||||
m_list->setColumnHidden(GameListModel::COL_DESCRIPTION,
|
|
||||||
!SConfig::GetInstance().m_showDescriptionColumn);
|
|
||||||
m_list->setColumnHidden(GameListModel::COL_MAKER, !SConfig::GetInstance().m_showMakerColumn);
|
|
||||||
m_list->setColumnHidden(GameListModel::COL_ID, !SConfig::GetInstance().m_showIDColumn);
|
|
||||||
m_list->setColumnHidden(GameListModel::COL_COUNTRY, !SConfig::GetInstance().m_showRegionColumn);
|
|
||||||
m_list->setColumnHidden(GameListModel::COL_SIZE, !SConfig::GetInstance().m_showSizeColumn);
|
|
||||||
m_list->setColumnHidden(GameListModel::COL_FILE_NAME,
|
|
||||||
!SConfig::GetInstance().m_showFileNameColumn);
|
|
||||||
|
|
||||||
m_list->verticalHeader()->hide();
|
m_list->verticalHeader()->hide();
|
||||||
m_list->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
m_list->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
@ -147,6 +137,21 @@ GameList::~GameList()
|
||||||
m_list->horizontalHeader()->saveState());
|
m_list->horizontalHeader()->saveState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameList::UpdateColumnVisibility()
|
||||||
|
{
|
||||||
|
m_list->setColumnHidden(GameListModel::COL_PLATFORM, !SConfig::GetInstance().m_showSystemColumn);
|
||||||
|
m_list->setColumnHidden(GameListModel::COL_BANNER, !SConfig::GetInstance().m_showBannerColumn);
|
||||||
|
m_list->setColumnHidden(GameListModel::COL_TITLE, !SConfig::GetInstance().m_showTitleColumn);
|
||||||
|
m_list->setColumnHidden(GameListModel::COL_DESCRIPTION,
|
||||||
|
!SConfig::GetInstance().m_showDescriptionColumn);
|
||||||
|
m_list->setColumnHidden(GameListModel::COL_MAKER, !SConfig::GetInstance().m_showMakerColumn);
|
||||||
|
m_list->setColumnHidden(GameListModel::COL_ID, !SConfig::GetInstance().m_showIDColumn);
|
||||||
|
m_list->setColumnHidden(GameListModel::COL_COUNTRY, !SConfig::GetInstance().m_showRegionColumn);
|
||||||
|
m_list->setColumnHidden(GameListModel::COL_SIZE, !SConfig::GetInstance().m_showSizeColumn);
|
||||||
|
m_list->setColumnHidden(GameListModel::COL_FILE_NAME,
|
||||||
|
!SConfig::GetInstance().m_showFileNameColumn);
|
||||||
|
}
|
||||||
|
|
||||||
void GameList::MakeEmptyView()
|
void GameList::MakeEmptyView()
|
||||||
{
|
{
|
||||||
m_empty = new QLabel(this);
|
m_empty = new QLabel(this);
|
||||||
|
@ -653,4 +658,6 @@ void GameList::SetSearchTerm(const QString& term)
|
||||||
|
|
||||||
m_list_proxy->invalidate();
|
m_list_proxy->invalidate();
|
||||||
m_grid_proxy->invalidate();
|
m_grid_proxy->invalidate();
|
||||||
|
|
||||||
|
UpdateColumnVisibility();
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,8 @@ private:
|
||||||
void ExportWiiSave();
|
void ExportWiiSave();
|
||||||
void CompressISO();
|
void CompressISO();
|
||||||
void ChangeDisc();
|
void ChangeDisc();
|
||||||
|
void UpdateColumnVisibility();
|
||||||
|
|
||||||
void OnHeaderViewChanged();
|
void OnHeaderViewChanged();
|
||||||
void OnSectionResized(int index, int, int);
|
void OnSectionResized(int index, int, int);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue