From 8bad37e82371bd41864903ac0d6f49808ad119bf Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 8 Nov 2008 06:15:08 +0000 Subject: [FIX] No more asserts in sigmod [FIX] Moved to using *ById instead of *Index methods in sigmod [FIX] Tilemaps are now collaged (not completely done on the editing side yet) [FIX] Removed the resource files (drawn natively instead) [FIX] ATBTimer now uses the built-in QTimer in a QObject [FIX] Coordinates are now edited on the map for warps, trainers, and effects [FIX] Tiles are now completely scripted [FIX] Config is now thread-safe git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@308 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- sigmodr/models/CoinListObjectModel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sigmodr/models/CoinListObjectModel.cpp') diff --git a/sigmodr/models/CoinListObjectModel.cpp b/sigmodr/models/CoinListObjectModel.cpp index ee74e2e4..8264e272 100644 --- a/sigmodr/models/CoinListObjectModel.cpp +++ b/sigmodr/models/CoinListObjectModel.cpp @@ -50,15 +50,15 @@ QVariant Sigmodr::CoinListObjectModel::data(int role) const Sigmod::CoinListObject* object = qobject_cast(m_object); if (object->type() == Sigmod::CoinListObject::Item) { - const int index = qobject_cast(m_object->sigmod())->itemIndex(object->object()); - if (index != INT_MAX) - return qobject_cast(m_object->sigmod())->item(index)->name(); + const Sigmod::Item* item = m_object->sigmod()->itemById(object->object()); + if (item) + return item->name(); } else if (object->type() == Sigmod::CoinListObject::Species) { - const int index = qobject_cast(m_object->sigmod())->speciesIndex(object->object()); - if (index != INT_MAX) - return qobject_cast(m_object->sigmod())->species(index)->name(); + const Sigmod::Species* species = m_object->sigmod()->speciesById(object->object()); + if (species) + return species->name(); } return ""; } -- cgit