mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Code Cleanup.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
16d0a47853
commit
94c3545c18
1 changed files with 2 additions and 5 deletions
|
@ -148,12 +148,9 @@ void DiveListView::currentChanged(const QModelIndex& current, const QModelIndex&
|
|||
const QAbstractItemModel *model = current.model();
|
||||
int selectedDive = 0;
|
||||
struct dive *dive = (struct dive*) model->data(current, TreeItemDT::DIVE_ROLE).value<void*>();
|
||||
if (!dive) { // it's a trip! select first child.
|
||||
if (!dive) // it's a trip! select first child.
|
||||
dive = (struct dive*) model->data(current.child(0,0), TreeItemDT::DIVE_ROLE).value<void*>();
|
||||
selectedDive = get_divenr(dive);
|
||||
} else {
|
||||
selectedDive = get_divenr(dive);
|
||||
}
|
||||
selectedDive = get_divenr(dive);
|
||||
if (selectedDive == selected_dive)
|
||||
return;
|
||||
Q_EMIT currentDiveChanged(selectedDive);
|
||||
|
|
Loading…
Add table
Reference in a new issue