diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-06-06 11:22:08 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-06-06 11:28:20 +0900 |
commit | 6f7e13ac70499ccc74ecf9d03aea65883f530b5c (patch) | |
tree | 2145fc1337f83a033f6ffcc66a8bd45354bff787 /qt-ui/divelistview.cpp | |
parent | 3f7490c2053090bfd54de2fcb4df23c5be7b5ffd (diff) | |
download | subsurface-6f7e13ac70499ccc74ecf9d03aea65883f530b5c.tar.gz |
Try to get rid of unnecessary reloads of the dive list
Don't call refreshDisplay() after preferences change. This strangely
somehow leads to a situation where I need to move the mouse over the dive
list before changes to the units are reflected.
When calling reload() do not force layout change / resort unless that is
the intention.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r-- | qt-ui/divelistview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index bc6eee87b..f0cb01a82 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -128,8 +128,10 @@ void DiveListView::headerClicked(int i) void DiveListView::reload(DiveTripModel::Layout layout, bool forceSort) { - currentLayout = layout; - + if (layout == DiveTripModel::CURRENT) + layout = currentLayout; + else + currentLayout = layout; header()->setClickable(true); connect(header(), SIGNAL(sectionPressed(int)), this, SLOT(headerClicked(int)), Qt::UniqueConnection); |