Don't store shuffle zone check - always check it
It doesn't make any sense to store that particular setting
This commit is contained in:
parent
8d0a5cf86a
commit
d0f4d96d17
3 changed files with 3 additions and 17 deletions
|
@ -49,7 +49,6 @@ SettingsCache::SettingsCache()
|
|||
zoneViewSortByName = settings->value("zoneview/sortbyname", true).toBool();
|
||||
zoneViewSortByType = settings->value("zoneview/sortbytype", true).toBool();
|
||||
zoneViewPileView = settings->value("zoneview/pileview", true).toBool();
|
||||
zoneViewShuffle = settings->value("zoneview/shuffle", true).toBool();
|
||||
|
||||
soundEnabled = settings->value("sound/enabled", false).toBool();
|
||||
soundPath = settings->value("sound/path").toString();
|
||||
|
@ -261,11 +260,6 @@ void SettingsCache::setZoneViewPileView(int _zoneViewPileView){
|
|||
settings->setValue("zoneview/pileview", zoneViewPileView);
|
||||
}
|
||||
|
||||
void SettingsCache::setZoneViewShuffle(int _zoneViewShuffle) {
|
||||
zoneViewShuffle = _zoneViewShuffle;
|
||||
settings->setValue("zoneview/shuffle", zoneViewShuffle);
|
||||
}
|
||||
|
||||
void SettingsCache::setSoundEnabled(int _soundEnabled)
|
||||
{
|
||||
soundEnabled = _soundEnabled;
|
||||
|
|
|
@ -57,7 +57,7 @@ private:
|
|||
int minPlayersForMultiColumnLayout;
|
||||
bool tapAnimation;
|
||||
bool chatMention;
|
||||
bool zoneViewSortByName, zoneViewSortByType, zoneViewPileView, zoneViewShuffle;
|
||||
bool zoneViewSortByName, zoneViewSortByType, zoneViewPileView;
|
||||
bool soundEnabled;
|
||||
QString soundPath;
|
||||
bool priceTagFeature;
|
||||
|
@ -103,11 +103,6 @@ public:
|
|||
@return zoneViewPileView if the view should be sorted into pile view.
|
||||
*/
|
||||
bool getZoneViewPileView() const { return zoneViewPileView; }
|
||||
/**
|
||||
Returns if the view should be shuffled on closing.
|
||||
@return zoneViewShuffle if the view should be shuffled on closing.
|
||||
*/
|
||||
bool getZoneViewShuffle() const { return zoneViewShuffle; }
|
||||
bool getSoundEnabled() const { return soundEnabled; }
|
||||
QString getSoundPath() const { return soundPath; }
|
||||
bool getPriceTagFeature() const { return priceTagFeature; }
|
||||
|
@ -149,7 +144,6 @@ public slots:
|
|||
void setZoneViewSortByName(int _zoneViewSortByName);
|
||||
void setZoneViewSortByType(int _zoneViewSortByType);
|
||||
void setZoneViewPileView(int _zoneViewPileView);
|
||||
void setZoneViewShuffle(int _zoneViewShuffle);
|
||||
void setSoundEnabled(int _soundEnabled);
|
||||
void setSoundPath(const QString &_soundPath);
|
||||
void setPriceTagFeature(int _priceTagFeature);
|
||||
|
|
|
@ -101,7 +101,7 @@ ZoneViewWidget::ZoneViewWidget(Player *_player, CardZone *_origZone, int numberC
|
|||
}
|
||||
|
||||
if (_origZone->getIsShufflable() && (numberCards == -1)) {
|
||||
shuffleCheckBox.setChecked(settingsCache->getZoneViewShuffle());
|
||||
shuffleCheckBox.setChecked(true);
|
||||
QGraphicsProxyWidget *shuffleProxy = new QGraphicsProxyWidget;
|
||||
shuffleProxy->setWidget(&shuffleCheckBox);
|
||||
vbox->addItem(shuffleProxy);
|
||||
|
@ -225,10 +225,8 @@ void ZoneViewWidget::closeEvent(QCloseEvent *event)
|
|||
cmd.set_zone_name(zone->getName().toStdString());
|
||||
player->sendGameCommand(cmd);
|
||||
}
|
||||
if (shuffleCheckBox.isChecked())
|
||||
if (shuffleCheckBox.isChecked())
|
||||
player->sendGameCommand(Command_Shuffle());
|
||||
if (canBeShuffled)
|
||||
settingsCache->setZoneViewShuffle(shuffleCheckBox.isChecked());
|
||||
emit closePressed(this);
|
||||
deleteLater();
|
||||
event->accept();
|
||||
|
|
Loading…
Reference in a new issue