summaryrefslogtreecommitdiffstats
path: root/pokemodr/models/CoinListObjectModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemodr/models/CoinListObjectModel.cpp')
-rw-r--r--pokemodr/models/CoinListObjectModel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/pokemodr/models/CoinListObjectModel.cpp b/pokemodr/models/CoinListObjectModel.cpp
index ed788cae..ffe860c1 100644
--- a/pokemodr/models/CoinListObjectModel.cpp
+++ b/pokemodr/models/CoinListObjectModel.cpp
@@ -22,6 +22,7 @@
#include "../CoinListObjectUI.h"
// Pokemod includes
+#include "../../pokemod/CoinList.h"
#include "../../pokemod/CoinListObject.h"
#include "../../pokemod/Item.h"
#include "../../pokemod/Species.h"
@@ -30,7 +31,7 @@
#include <QDomDocument>
#include <QFile>
-CoinListObjectModel::CoinListObjectModel(BaseModel* parent, Object* object) :
+CoinListObjectModel::CoinListObjectModel(BaseModel* parent, CoinListObject* object) :
ObjectModel(parent, object)
{
}
@@ -87,5 +88,5 @@ bool CoinListObjectModel::setData(const QVariant& value, int role)
int CoinListObjectModel::indexNumber() const
{
- // TODO: get index number
+ return static_cast<const CoinList*>(m_object->parent())->objectIndex(m_object->id());
}