From 73cd8f3e569b5214b03dbc613a18d5d50dbec98f Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sat, 16 Nov 2013 18:47:34 -0200 Subject: Do not break Dive Headings on trip mode when a delete dive is done. When the dive is deleted, we force a recreation of the dive list, this is done because we were broken by design on the first transition to the Qt infrastructure - one thing to change for 4.1, but no time for 4.0. We forgot to ask the headers to 'please, span more than one row, please' when we recreate the model. easy =) Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/divelistview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index a34484dba..4a35176b8 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -255,6 +255,9 @@ void DiveListView::reload(DiveTripModel::Layout layout, bool forceSort) setAnimated(true); } } + if(currentLayout == DiveTripModel::TREE){ + fixMessyQtModelBehaviour(); + } } void DiveListView::reloadHeaderActions() @@ -485,7 +488,6 @@ void DiveListView::deleteDive() } mark_divelist_changed(TRUE); mainWindow()->refreshDisplay(); - reload(currentLayout, false); } void DiveListView::testSlot() -- cgit v1.2.3-70-g09d2