From fdd0eec1d145fb8ac97b4cc9aaed5218214416ec Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 15 May 2008 19:55:43 +0000 Subject: [FIX] Refactored out connections made within widgets [FIX] Flag, Fractiona, and Point widgets fixed to only emit signals when actually changed [FIX] Pokemod classes now emit signals git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@138 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/MapWildList.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pokemod/MapWildList.cpp') diff --git a/pokemod/MapWildList.cpp b/pokemod/MapWildList.cpp index 3c2f25f4..e9e7b71c 100644 --- a/pokemod/MapWildList.cpp +++ b/pokemod/MapWildList.cpp @@ -109,6 +109,7 @@ void MapWildList::setControl(const int control) } m_control = control; m_value = INT_MAX; + emit(changed()); } void MapWildList::setValue(const int value) @@ -127,6 +128,7 @@ void MapWildList::setValue(const int value) if ((effect->effect() == ItemEffect::E_Fish) && (effect->value2() == value)) { m_value = value; + emit(changed()); return; } } @@ -144,10 +146,16 @@ void MapWildList::setTime(const int time, const bool state) if (state) { if (!m_time.contains(time)) + { m_time.append(time); + emit(changed()); + } } else + { m_time.removeAll(time); + emit(changed()); + } } void MapWildList::setScope(const int scope) @@ -163,6 +171,7 @@ void MapWildList::setScope(const int scope) if ((effect->effect() == ItemEffect::E_Scope) && (effect->value2() == scope)) { m_scope = scope; + emit(changed()); return; } } @@ -170,7 +179,10 @@ void MapWildList::setScope(const int scope) emit(error(bounds("value"))); } else + { m_scope = scope; + emit(changed()); + } } int MapWildList::control() const -- cgit