summaryrefslogtreecommitdiffstats
path: root/pokemodr/PokemodTreeModel.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-05-11 22:35:28 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-05-11 22:35:28 +0000
commite11ae3d4907f0ce39b96ba6b29442be05f99b59c (patch)
tree4e042bc22c1808e39c08e49bc548d15f8e6bdab8 /pokemodr/PokemodTreeModel.cpp
parent3d877ca28bcb7c70945ff408bd0273e176472969 (diff)
downloadsigen-e11ae3d4907f0ce39b96ba6b29442be05f99b59c.tar.gz
sigen-e11ae3d4907f0ce39b96ba6b29442be05f99b59c.tar.xz
sigen-e11ae3d4907f0ce39b96ba6b29442be05f99b59c.zip
[FIX] UI widgets now load upon click
[FIX] Connections fixed now [ADD] Slots for errors and warnings made [ADD] Subclassed QTreeView for PokemodTree class [FIX] No more crashes on exit git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@124 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/PokemodTreeModel.cpp')
-rw-r--r--pokemodr/PokemodTreeModel.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/pokemodr/PokemodTreeModel.cpp b/pokemodr/PokemodTreeModel.cpp
index 03532c40..e41ec0d8 100644
--- a/pokemodr/PokemodTreeModel.cpp
+++ b/pokemodr/PokemodTreeModel.cpp
@@ -53,12 +53,9 @@ QVariant PokemodTreeModel::headerData(int /*section*/, Qt::Orientation /*orienta
QModelIndex PokemodTreeModel::index(int row, int /*column*/, const QModelIndex& parent) const
{
if (row < 0)
- return createIndex(-1, 0, m_root);
+ return createIndex(row, 0, m_root);
BaseModel* object = getItem(parent)->childItem(row);
- if (object)
- return createIndex(row, 0, object);
- else
- return QModelIndex();
+ return createIndex(row, 0, object);
}
QModelIndex PokemodTreeModel::parent(const QModelIndex& index) const