Cleanup: Remove dead code when picking a new dive site

When a new dive site is created in MainTab::updateDiveSite()
and there is no text, it gets a generic name. But: the function
exits early if there is no text, so this is dead code. Remove.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-03-03 16:24:18 +01:00 committed by Dirk Hohndel
parent e1caae0111
commit 2134d99d0c

View file

@ -657,7 +657,7 @@ struct dive_site *MainTab::updateDiveSite(struct dive_site *pickedDs, dive *d)
return origDs;
if (pickedDs == RECENTLY_ADDED_DIVESITE) {
QString name = ui.location->text().isEmpty() ? tr("New dive site") : ui.location->text();
QString name = ui.location->text();
pickedDs = create_dive_site(qPrintable(name), displayed_dive.when, &dive_site_table);
createdNewDive = true;
}