diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2015-05-31 17:56:53 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-31 16:02:35 -0700 |
commit | 6d9206150a9d0d9496542ab6c4a12d8a41a8f596 (patch) | |
tree | b086c3ca500b54a8fe164cc5a6ba2c4ba7c2be28 /qt-ui/locationinformation.cpp | |
parent | 7129cef66fa4d335d70e6d64ce9cb03f89b3610f (diff) | |
download | subsurface-6d9206150a9d0d9496542ab6c4a12d8a41a8f596.tar.gz |
Organize the dive_sites alphabetically
run std::sort on the dive_site list inside of the model.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r-- | qt-ui/locationinformation.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 6dc77c571..699b80d47 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -45,11 +45,6 @@ void LocationInformationWidget::setCurrentDiveSite(int dive_nr) void LocationInformationWidget::setLocationId(uint32_t uuid) { - LocationInformationModel *m = (LocationInformationModel*) ui.currentLocation->model(); - if (m->rowCount() == 0) { - m->update(); - } - currentDs = get_dive_site_by_uuid(uuid); if(!currentDs) return; @@ -138,7 +133,8 @@ void LocationInformationWidget::rejectChanges() void LocationInformationWidget::showEvent(QShowEvent *ev) { - emit startFilterDiveSite(displayed_dive_site.uuid); + if (displayed_dive_site.uuid) + emit startFilterDiveSite(displayed_dive_site.uuid); ui.diveSiteMessage->setCloseButtonVisible(false); QGroupBox::showEvent(ev); } |