aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/TabDiveSite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveSite.cpp')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveSite.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveSite.cpp b/desktop-widgets/tab-widgets/TabDiveSite.cpp
index 81736bc77..5e2831c93 100644
--- a/desktop-widgets/tab-widgets/TabDiveSite.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveSite.cpp
@@ -8,7 +8,10 @@ TabDiveSite::TabDiveSite(QWidget *parent) : TabBase(parent)
{
ui.setupUi(this);
ui.diveSites->setTitle(tr("Dive sites"));
- ui.diveSites->setModel(LocationInformationModel::instance());
+ ui.diveSites->setModel(&model);
+ // Default: sort by name
+ ui.diveSites->view()->sortByColumn(LocationInformationModel::NAME, Qt::AscendingOrder);
+ ui.diveSites->view()->setSortingEnabled(true);
// Show only the first few columns
for (int i = LocationInformationModel::COORDS; i < LocationInformationModel::COLUMNS; ++i)