diff options
Diffstat (limited to 'pokemodr/CoinListUI.cpp')
| -rw-r--r-- | pokemodr/CoinListUI.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pokemodr/CoinListUI.cpp b/pokemodr/CoinListUI.cpp index f14bec0e..86115430 100644 --- a/pokemodr/CoinListUI.cpp +++ b/pokemodr/CoinListUI.cpp @@ -44,7 +44,10 @@ CoinListUI::CoinListUI(CoinList* c, QWidget* parent) : { const ItemEffect& effect = item.getEffect(j); if (effect.getEffect() == ItemEffect::E_CoinCase) - varValue->addItem(item.getName(), QVariant(effect.getVal1())); + { + varValue->addItem(item.getName()); + varValue->setItemData(varValue->count() - 1, QVariant(effect.getVal1())); + } } } setGui(); @@ -84,7 +87,7 @@ void CoinListUI::on_varValue_currentIndexChanged(const int v) { try { - coinList_mod->setValue(varValue->itemData(v, Qt::UserRole).toInt()); + coinList_mod->setValue(varValue->itemData(v).toInt()); emit(setChanged(true)); } catch (Exception& e) |
