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>
This commit is contained in:
Tomaz Canabrava 2015-05-31 17:56:53 -03:00 committed by Dirk Hohndel
parent 7129cef66f
commit 6d9206150a
2 changed files with 8 additions and 7 deletions

View file

@ -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);
}