Merge pull request #7171 from spycrab/qt_search_fix
Qt/GameList: Fix search messing up columns
This commit is contained in:
commit
52dd41fa95
|
@ -121,17 +121,7 @@ void GameList::MakeListView()
|
|||
m_list->setColumnWidth(GameListModel::COL_SIZE, 85);
|
||||
m_list->setColumnWidth(GameListModel::COL_ID, 70);
|
||||
|
||||
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);
|
||||
UpdateColumnVisibility();
|
||||
|
||||
m_list->verticalHeader()->hide();
|
||||
m_list->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
|
@ -147,6 +137,21 @@ GameList::~GameList()
|
|||
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()
|
||||
{
|
||||
m_empty = new QLabel(this);
|
||||
|
@ -653,4 +658,6 @@ void GameList::SetSearchTerm(const QString& term)
|
|||
|
||||
m_list_proxy->invalidate();
|
||||
m_grid_proxy->invalidate();
|
||||
|
||||
UpdateColumnVisibility();
|
||||
}
|
||||
|
|
|
@ -55,6 +55,8 @@ private:
|
|||
void ExportWiiSave();
|
||||
void CompressISO();
|
||||
void ChangeDisc();
|
||||
void UpdateColumnVisibility();
|
||||
|
||||
void OnHeaderViewChanged();
|
||||
void OnSectionResized(int index, int, int);
|
||||
|
||||
|
|
Loading…
Reference in New Issue