summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-11-28 15:29:03 +0100
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2019-12-04 13:00:23 +0100
commit55ffd5d1b5e5fddaac9baec914ace4e07fff667c (patch)
treee3bd66b7a4b45f5325e1665351b4e01ec7448709 /desktop-widgets/tab-widgets/maintab.cpp
parentbddca1ecc96480ee763efbd717b5e23a18bd05d0 (diff)
downloadsubsurface-55ffd5d1b5e5fddaac9baec914ace4e07fff667c.tar.gz
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets/maintab.cpp')
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp2
1 files changed, 0 insertions, 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);