From 6fb3a499e67bc5375e66faef5969afee99a74d25 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 29 Oct 2018 15:14:29 +0100 Subject: Dive list: remove forceSort parameter from DiveListView::reload() DiveListView::reload() was called for full reset of the dive list and for changing the view (tree vs. lis) in DiveListView::headerClicked(). Since the latter does sorting by itself, a parameter "forceSort" was introduced, which defaulted to true, but was set to false by DiveListView::headerClicked(). To remove complexity, simply let DiveListView::headerClicked() set the view by itself and remove tha parameter. Signed-off-by: Berthold Stoeger --- desktop-widgets/tab-widgets/maintab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets/tab-widgets/maintab.cpp') diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 102570174..d27a4730d 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -926,7 +926,7 @@ void MainTab::acceptChanges() int scrolledBy = MainWindow::instance()->diveList->verticalScrollBar()->sliderPosition(); resetPallete(); if (editMode == MANUALLY_ADDED_DIVE) { - MainWindow::instance()->diveList->reload(DiveTripModel::CURRENT, true); + MainWindow::instance()->diveList->reload(DiveTripModel::CURRENT); int newDiveNr = get_divenr(get_dive_by_uniq_id(addedId)); MainWindow::instance()->diveList->unselectDives(); MainWindow::instance()->diveList->selectDive(newDiveNr, true); -- cgit v1.2.3-70-g09d2