diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-03-03 16:24:18 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | 2134d99d0c98603fa5182fe1946bc330e44ad9ed (patch) | |
tree | cedb45f61e721424fbab19cadd4d974476abe50f /desktop-widgets/tab-widgets/maintab.cpp | |
parent | e1caae0111f04e19a7f14bab81f933eeab41b623 (diff) | |
download | subsurface-2134d99d0c98603fa5182fe1946bc330e44ad9ed.tar.gz |
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>
Diffstat (limited to 'desktop-widgets/tab-widgets/maintab.cpp')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 7f30c8962..edabd41fe 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -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; } |