functional changes

This commit is contained in:
RickyRister 2024-11-29 12:55:08 -08:00
parent a03afa0191
commit 8bce815d0e

View file

@ -125,8 +125,8 @@ ZoneViewWidget::ZoneViewWidget(Player *_player,
connect(&sortBySelector, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, connect(&sortBySelector, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
&ZoneViewWidget::processSortBy); &ZoneViewWidget::processSortBy);
connect(&pileViewCheckBox, &QCheckBox::QT_STATE_CHANGED, this, &ZoneViewWidget::processSetPileView); connect(&pileViewCheckBox, &QCheckBox::QT_STATE_CHANGED, this, &ZoneViewWidget::processSetPileView);
groupBySelector.setCurrentIndex(groupBySelector.findData(SettingsCache::instance().getZoneViewGroupByIndex())); groupBySelector.setCurrentIndex(SettingsCache::instance().getZoneViewGroupByIndex());
sortBySelector.setCurrentIndex(sortBySelector.findData(SettingsCache::instance().getZoneViewSortByIndex())); sortBySelector.setCurrentIndex(SettingsCache::instance().getZoneViewSortByIndex());
pileViewCheckBox.setChecked(SettingsCache::instance().getZoneViewPileView()); pileViewCheckBox.setChecked(SettingsCache::instance().getZoneViewPileView());
if (CardList::NoSort == static_cast<CardList::SortOption>(groupBySelector.currentData().toInt())) { if (CardList::NoSort == static_cast<CardList::SortOption>(groupBySelector.currentData().toInt())) {
@ -154,7 +154,7 @@ ZoneViewWidget::ZoneViewWidget(Player *_player,
void ZoneViewWidget::processGroupBy(int index) void ZoneViewWidget::processGroupBy(int index)
{ {
auto option = static_cast<CardList::SortOption>(groupBySelector.itemData(index).toInt()); auto option = static_cast<CardList::SortOption>(groupBySelector.itemData(index).toInt());
SettingsCache::instance().setZoneViewGroupByIndex(option); SettingsCache::instance().setZoneViewGroupByIndex(index);
zone->setGroupBy(option); zone->setGroupBy(option);
// disable pile view checkbox if we're not grouping by anything // disable pile view checkbox if we're not grouping by anything
@ -178,7 +178,7 @@ void ZoneViewWidget::processSortBy(int index)
return; return;
} }
SettingsCache::instance().setZoneViewSortByIndex(option); SettingsCache::instance().setZoneViewSortByIndex(index);
zone->setSortBy(option); zone->setSortBy(option);
} }