diff options
Diffstat (limited to 'pokemod/Store.cpp')
| -rw-r--r-- | pokemod/Store.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/pokemod/Store.cpp b/pokemod/Store.cpp index a8ba35d8..10c40dbd 100644 --- a/pokemod/Store.cpp +++ b/pokemod/Store.cpp @@ -82,15 +82,12 @@ void Store::setItem(const int item, const bool state) emit(error(bounds("item"))); return; } - if (state) + if (state && !m_item.contains(item)) { - if (!m_item.contains(item)) - { - m_item.append(item); - emit(changed()); - } + m_item.append(item); + emit(changed()); } - else + else if (m_item.contains(item)) { m_item.removeAll(item); emit(changed()); |
