Merge branch 'fix-deck-shuffle-check'

This commit is contained in:
Zach H 2015-01-29 21:10:34 -05:00
commit b608d81037
3 changed files with 3 additions and 17 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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);
@ -227,8 +227,6 @@ void ZoneViewWidget::closeEvent(QCloseEvent *event)
}
if (shuffleCheckBox.isChecked())
player->sendGameCommand(Command_Shuffle());
if (canBeShuffled)
settingsCache->setZoneViewShuffle(shuffleCheckBox.isChecked());
emit closePressed(this);
deleteLater();
event->accept();