Dive site: remove implicit deletion of empty dive sites

There was a way of deleting dive sites by clearing all fields.
This is not necessary anymore, as now the user can delete a
dive site in the dive site list.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-03-13 19:42:52 +01:00 committed by Dirk Hohndel
parent f022a4a4d0
commit 0fd85832b7
3 changed files with 0 additions and 19 deletions

View file

@ -136,19 +136,6 @@ void LocationInformationModel::update()
endResetModel();
}
bool LocationInformationModel::removeRows(int row, int, const QModelIndex&)
{
if(row >= rowCount())
return false;
beginRemoveRows(QModelIndex(), row, row);
struct dive_site *ds = get_dive_site(row, &dive_site_table);
if (ds)
delete_dive_site(ds, &dive_site_table);
endRemoveRows();
return true;
}
void LocationInformationModel::diveSiteDiveCountChanged(dive_site *ds)
{
int idx = get_divesite_idx(ds, &dive_site_table);