aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/divelistview.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-16 20:52:01 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-16 20:52:01 -0400
commit396d73705e268619c07178171e3b99f095485ebd (patch)
tree703d54ed6243e8ece807560da735c38f4ea2ad85 /qt-ui/divelistview.cpp
parent242ef056f6eaab44cd4283b7015f2aef4e6c0811 (diff)
parent2b6c3b4c0cb094a06bc832573f68be00de9d7293 (diff)
downloadsubsurface-396d73705e268619c07178171e3b99f095485ebd.tar.gz
Merge branch 'multiDiveEdition' of https://github.com/tcanabrava/subsurface
Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Conflicts: qt-ui/maintab.h
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r--qt-ui/divelistview.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 4b856f601..2e40678ad 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -226,16 +226,7 @@ void DiveListView::currentChanged(const QModelIndex& current, const QModelIndex&
{
if (!current.isValid())
return;
- const QAbstractItemModel *model = current.model();
- int selectedDive = 0;
- struct dive *dive = (struct dive*) model->data(current, DiveTripModel::DIVE_ROLE).value<void*>();
- if (!dive) // it's a trip! select first child.
- dive = (struct dive*) model->data(current.child(0,0), DiveTripModel::DIVE_ROLE).value<void*>();
- selectedDive = get_divenr(dive);
scrollTo(current);
- if (selectedDive == selected_dive)
- return;
- Q_EMIT currentDiveChanged(selectedDive);
}
void DiveListView::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected)