summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/divecomputermanagementdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/divecomputermanagementdialog.cpp')
-rw-r--r--desktop-widgets/divecomputermanagementdialog.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/desktop-widgets/divecomputermanagementdialog.cpp b/desktop-widgets/divecomputermanagementdialog.cpp
index 0ff358c22..179a69cfb 100644
--- a/desktop-widgets/divecomputermanagementdialog.cpp
+++ b/desktop-widgets/divecomputermanagementdialog.cpp
@@ -20,7 +20,11 @@ DiveComputerManagementDialog::DiveComputerManagementDialog(QWidget *parent, Qt::
void DiveComputerManagementDialog::init()
{
model.reset(new DiveComputerModel(dcList.dcMap));
+ model->update();
ui.tableView->setModel(model.data());
+ ui.tableView->resizeColumnsToContents();
+ ui.tableView->setColumnWidth(DiveComputerModel::REMOVE, 22);
+ layout()->activate();
}
DiveComputerManagementDialog *DiveComputerManagementDialog::instance()
@@ -29,14 +33,6 @@ DiveComputerManagementDialog *DiveComputerManagementDialog::instance()
return self;
}
-void DiveComputerManagementDialog::update()
-{
- model->update();
- ui.tableView->resizeColumnsToContents();
- ui.tableView->setColumnWidth(DiveComputerModel::REMOVE, 22);
- layout()->activate();
-}
-
void DiveComputerManagementDialog::tryRemove(const QModelIndex &index)
{
if (index.column() != DiveComputerModel::REMOVE)