summaryrefslogtreecommitdiffstats
path: root/pokemod/Map.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-05-21 17:22:27 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-05-21 17:22:27 +0000
commitfa85318e91ea9bbe4638092767b3b8e0ea64f57c (patch)
treeeb0bcb69ab624721d59ec9905d392937810cb7b6 /pokemod/Map.cpp
parent404b30c8601d3a3cb25bb6972427d93b1ebed640 (diff)
[FIX] Classes in pokemod will no longer emit a changed signal if not actually changed
[FIX] Logic error with checking to see if certain GUI elements need resetting [FIX] Using activated rather than currentIndexChanged signals for combo boxes [FIX] Qt bugs now irrelevant git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@161 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Map.cpp')
-rw-r--r--pokemod/Map.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/pokemod/Map.cpp b/pokemod/Map.cpp
index 92cdb98e..d66552e6 100644
--- a/pokemod/Map.cpp
+++ b/pokemod/Map.cpp
@@ -152,19 +152,17 @@ QDomElement Map::save() const
void Map::setName(const QString& name)
{
- m_name = name;
- emit(changed());
+ CHECK(name);
}
-void Map::setFlyWarp(const int warp)
+void Map::setFlyWarp(const int flyWarp)
{
- if ((warp != INT_MAX) && (warpIndex(warp) == INT_MAX))
+ if ((flyWarp != INT_MAX) && (warpIndex(flyWarp) == INT_MAX))
{
- emit(error(bounds("warp")));
+ emit(error(bounds("flyWarp")));
return;
}
- m_flyWarp = warp;
- emit(changed());
+ CHECK(flyWarp);
}
void Map::setType(const int type)
@@ -174,8 +172,7 @@ void Map::setType(const int type)
emit(error(bounds("type")));
return;
}
- m_type = type;
- emit(changed());
+ CHECK(type);
}
QString Map::name() const