From 55ffd5d1b5e5fddaac9baec914ace4e07fff667c Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 28 Nov 2019 15:29:03 +0100 Subject: Cleanup: remove unnecessary remember/restoreSelection() pair When accepting changes, the main tab refreshes the display in a remember/restoreSelection() pair. Since the display refresh doesn't lose selection, these calls can be removed. Signed-off-by: Berthold Stoeger --- desktop-widgets/tab-widgets/maintab.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 02ccb900b..01e630104 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -554,9 +554,7 @@ void MainTab::acceptChanges() MainWindow::instance()->refreshDisplay(); MainWindow::instance()->graphics->replot(); } else { - MainWindow::instance()->diveList->rememberSelection(); MainWindow::instance()->refreshDisplay(); - MainWindow::instance()->diveList->restoreSelection(); } DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING); MainWindow::instance()->diveList->verticalScrollBar()->setSliderPosition(scrolledBy); -- cgit v1.2.3-70-g09d2