aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-11-08 20:46:25 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-09 15:33:34 +0900
commit38287a1c1ea32b00f64b0ef60d9a99aff855335a (patch)
tree430f853c611785fddbaab9787ad461a3f7d110a3 /qt-ui/mainwindow.cpp
parent7dbf76384f78b415250ec3de3090ea1ae68e3ac3 (diff)
downloadsubsurface-38287a1c1ea32b00f64b0ef60d9a99aff855335a.tar.gz
Save the status of the tree before trying to reset the display.
This is a try: when the user changes the orientation on the columns by clicking on the title of them and organizing by something that's not the number, we lost track of the opened branches. this commit doesn't fix that, but it fixes a possible similar issue. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 643ad2e30..5c0a9b350 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -60,6 +60,8 @@ MainWindow::MainWindow() : helpView(0)
ui.ListWidget->reloadHeaderActions();
ui.ListWidget->setFocus();
ui.globe->reload();
+ ui.ListWidget->expand(ui.ListWidget->model()->index(0,0));
+ ui.ListWidget->scrollTo(ui.ListWidget->model()->index(0,0), QAbstractItemView::PositionAtCenter);
}
// this gets called after we download dives from a divecomputer