Dive site: remove edit mode from dive location widget

Since no dive site field editing enters edit mode anymore,
the whole edit mode state and code can be removed from the
widget.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-03-14 23:28:45 +01:00 committed by Dirk Hohndel
parent 0b851d723e
commit b5d4d88fe5
10 changed files with 30 additions and 113 deletions

View file

@ -208,17 +208,8 @@ void EditDiveSiteCountry::undo()
redo();
}
// Parse GPS text into location_t
static location_t parseGpsText(const QString &text)
{
double lat, lon;
if (parseGpsText(text, &lat, &lon))
return create_location(lat, lon);
return { {0}, {0} };
}
EditDiveSiteLocation::EditDiveSiteLocation(dive_site *dsIn, const QString &location) : ds(dsIn),
value(parseGpsText(location))
EditDiveSiteLocation::EditDiveSiteLocation(dive_site *dsIn, const location_t location) : ds(dsIn),
value(location)
{
setText(tr("Edit dive site location"));
}