mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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:
parent
e1caae0111
commit
2134d99d0c
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue