aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-25 07:01:06 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-25 07:03:38 -0700
commitc29109744e56a919b2d5ef417ac287bb2aada6cf (patch)
treeeed81dff277e9b485d33c4bf2c6ae9b2c5e0777b /qt-ui
parentff966f2c1ab7a28bec2aa9f5ca8cca94bb7654e2 (diff)
downloadsubsurface-c29109744e56a919b2d5ef417ac287bb2aada6cf.tar.gz
Dive list: don't reset column width when reloading
We set the column width in the dive list widget when we create that widget, based on what is in the settings. And we save the current column width back to the settings when we destroy that widget (so if Subsurface is shut down correctly and Qt actually gets to run the destructor but not when someone kills the program). That means that if we recreate the dive list at any point while Subsurface is running (and we do that a lot when you manipulate your dive list in any way shape or form), any changes to the column widths are lost. DiveListView::reload() explicitly calls setupUi() which reads the column widths back from the settings - but changes made to the columns aren't saved to the settings until we destroy the widget... I see no reason why reload() should call setupUi(), so I'm removing that call. Let's hope this doesn't break anything else. Fixes #518 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelistview.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 56617479b..29157737f 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -351,7 +351,6 @@ void DiveListView::reload(DiveTripModel::Layout layout, bool forceSort)
setCurrentIndex(firstDiveOrTrip);
}
}
- setupUi();
if (selectedIndexes().count()) {
QModelIndex curr = selectedIndexes().first();
curr = curr.parent().isValid() ? curr.parent() : curr;