mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-21 01:42:15 -07:00
functional changes
This commit is contained in:
parent
a03afa0191
commit
8bce815d0e
1 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue