Don't force the DiveListView to be a tree when reloading

We should keep whatever view the user last used.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-11-05 13:54:44 +09:00
parent 9383693928
commit eaa0d647b7

View file

@ -67,7 +67,7 @@ void MainWindow::refreshDisplay()
{ {
ui.InfoWidget->reload(); ui.InfoWidget->reload();
ui.globe->reload(); ui.globe->reload();
ui.ListWidget->reload(DiveTripModel::TREE); ui.ListWidget->reload(DiveTripModel::CURRENT);
ui.ListWidget->setFocus(); ui.ListWidget->setFocus();
WSInfoModel *wsim = WSInfoModel::instance(); WSInfoModel *wsim = WSInfoModel::instance();
wsim->updateInfo(); wsim->updateInfo();
@ -825,7 +825,7 @@ void MainWindow::editCurrentDive()
{ {
struct dive *d = current_dive; struct dive *d = current_dive;
QString defaultDC(d->dc.model); QString defaultDC(d->dc.model);
if (defaultDC == tr("manually added dive")){ if (defaultDC == tr("manually added dive")){
disableDcShortcuts(); disableDcShortcuts();
DivePlannerPointsModel::instance()->setPlanMode(false); DivePlannerPointsModel::instance()->setPlanMode(false);
@ -835,7 +835,6 @@ void MainWindow::editCurrentDive()
ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE); ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE);
} }
else if (defaultDC == tr("Simulated Dive")){ else if (defaultDC == tr("Simulated Dive")){
// this looks like something is missing here
} }
} }