diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index e9855bda7..edc425bfb 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -23,6 +23,7 @@ #include #include #include +#include MainTab::MainTab(QWidget *parent) : QTabWidget(parent), weightModel(new WeightModel()), @@ -633,7 +634,7 @@ void MainTab::acceptChanges() if (d) fixup_dive(d); } - + int scrolledBy = mainWindow()->dive_list()->verticalScrollBar()->sliderPosition(); resetPallete(); if(editMode == ADD || editMode == MANUALLY_ADDED_DIVE){ mainWindow()->dive_list()->unselectDives(); @@ -659,6 +660,7 @@ void MainTab::acceptChanges() mainWindow()->refreshDisplay(); mainWindow()->dive_list()->restoreSelection(); } + mainWindow()->dive_list()->verticalScrollBar()->setSliderPosition(scrolledBy); } void MainTab::resetPallete()