aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-13 22:14:59 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-13 21:37:08 -0500
commitee7f579242568d86e7ec744c17585066c30fa943 (patch)
tree56931e11aa77752f0a04b0eb2807f074807b5c47 /qt-ui/models.cpp
parenta6d9f274454c09b39d79a6300de85b4c99722770 (diff)
downloadsubsurface-ee7f579242568d86e7ec744c17585066c30fa943.tar.gz
Trying to make the DiveList selection behave correctly
And rip out all the code that Dirk put there to do that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 90143b912..68ab402cd 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -660,15 +660,14 @@ int DiveTripModel::rowCount(const QModelIndex& parent) const
{
TreeItemDT* parentItem;
- if (parent.column() > 0)
- return 0;
-
if (!parent.isValid())
parentItem = rootItem;
else
parentItem = static_cast<TreeItemDT*>(parent.internalPointer());
- return parentItem->childs.count();
+ int amount = parentItem->childs.count();
+
+ return amount;
}
void DiveTripModel::setupModelData()