summaryrefslogtreecommitdiffstats
path: root/pokemodr/models/MapWildListModel.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-05-09 22:10:24 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-05-09 22:10:24 +0000
commit3d877ca28bcb7c70945ff408bd0273e176472969 (patch)
treeb7789493be9b11856ea9068ddcf514d22a0ec56b /pokemodr/models/MapWildListModel.cpp
parent32a23089b9e2dfe59b3e70be814d8eee9ed9fb61 (diff)
downloadsigen-3d877ca28bcb7c70945ff408bd0273e176472969.tar.gz
sigen-3d877ca28bcb7c70945ff408bd0273e176472969.tar.xz
sigen-3d877ca28bcb7c70945ff408bd0273e176472969.zip
[FIX] More test code for the tree bug
[FIX] Rules now a pointer in Pokemod git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@123 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/models/MapWildListModel.cpp')
-rw-r--r--pokemodr/models/MapWildListModel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/pokemodr/models/MapWildListModel.cpp b/pokemodr/models/MapWildListModel.cpp
index cdac854e..09da76f4 100644
--- a/pokemodr/models/MapWildListModel.cpp
+++ b/pokemodr/models/MapWildListModel.cpp
@@ -45,7 +45,11 @@ MapWildListModel::~MapWildListModel()
QVariant MapWildListModel::data(int role) const
{
if (role == Qt::DisplayRole)
- return MapWildList::ControlStr[static_cast<MapWildList*>(m_object)->control()];
+ {
+ if (static_cast<MapWildList*>(m_object)->control() < MapWildList::End)
+ return MapWildList::ControlStr[static_cast<MapWildList*>(m_object)->control()];
+ return "UNSET";
+ }
else if (role == BaseModel::XmlRole)
{
QDomDocument xml(m_object->className());