mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
Create an enum for price sources
Probably settingscache would have been the correct place for the enum, but keeping it in the same class/file where price sources are defined sounds cleaner to me
This commit is contained in:
parent
a9ffbf5d2d
commit
9ca5908de5
3 changed files with 10 additions and 7 deletions
|
|
@ -24,6 +24,7 @@
|
|||
#include "dlg_settings.h"
|
||||
#include "main.h"
|
||||
#include "settingscache.h"
|
||||
#include "priceupdater.h"
|
||||
|
||||
GeneralSettingsPage::GeneralSettingsPage()
|
||||
{
|
||||
|
|
@ -538,10 +539,10 @@ DeckEditorSettingsPage::DeckEditorSettingsPage()
|
|||
|
||||
switch(settingsCache->getPriceTagSource())
|
||||
{
|
||||
case 0:
|
||||
case AbstractPriceUpdater::BLPPriceSource:
|
||||
priceTagSource0->setChecked(true);
|
||||
break;
|
||||
case 1:
|
||||
case AbstractPriceUpdater::DBPriceSource:
|
||||
priceTagSource1->setChecked(true);
|
||||
break;
|
||||
}
|
||||
|
|
@ -578,11 +579,11 @@ void DeckEditorSettingsPage::radioPriceTagSourceClicked(bool checked)
|
|||
if(!checked)
|
||||
return;
|
||||
|
||||
int source=0;
|
||||
int source=AbstractPriceUpdater::BLPPriceSource;
|
||||
if(priceTagSource0->isChecked())
|
||||
source=0;
|
||||
source=AbstractPriceUpdater::BLPPriceSource;
|
||||
if(priceTagSource1->isChecked())
|
||||
source=1;
|
||||
source=AbstractPriceUpdater::DBPriceSource;
|
||||
|
||||
emit priceTagSourceChanged(source);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue