diff --git a/cockatrice/src/settingscache.cpp b/cockatrice/src/settingscache.cpp index 8bfbeb2d..a0044976 100644 --- a/cockatrice/src/settingscache.cpp +++ b/cockatrice/src/settingscache.cpp @@ -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; diff --git a/cockatrice/src/settingscache.h b/cockatrice/src/settingscache.h index b4d6e9bf..084feaaf 100644 --- a/cockatrice/src/settingscache.h +++ b/cockatrice/src/settingscache.h @@ -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); diff --git a/cockatrice/src/zoneviewwidget.cpp b/cockatrice/src/zoneviewwidget.cpp index 13fb6962..dab5f862 100644 --- a/cockatrice/src/zoneviewwidget.cpp +++ b/cockatrice/src/zoneviewwidget.cpp @@ -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();