From 87bc8b43600937a3d83cbdf8345e23a484755e3a Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 2 Jun 2008 01:50:47 +0000 Subject: [FIX] Modified Rules a bit [FIX] Updated Rules widget to match up with Rules [FIX] Reorganized the Rules widget [FIX] Using KStandardDirs rather than hardcoded ones [FIX] Cleaned up some minor things with KListWidgets git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@188 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/Store.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'pokemod/Store.cpp') 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()); -- cgit