mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 06:45:27 +00:00
Start editing new site regardless what the user does first
It doesn't matter if we first enter coordinates, name, description or notes. If there is no currentDs we need to handle that gracefully. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bfee0a13f0
commit
d6e32b02f6
1 changed files with 3 additions and 3 deletions
|
@ -242,13 +242,13 @@ void LocationInformationWidget::on_diveSiteCoordinates_textChanged(const QString
|
|||
|
||||
void LocationInformationWidget::on_diveSiteDescription_textChanged(const QString& text)
|
||||
{
|
||||
if (!same_string(qPrintable(text), currentDs->description))
|
||||
if (!currentDs || !same_string(qPrintable(text), currentDs->description))
|
||||
markChangedWidget(ui.diveSiteDescription);
|
||||
}
|
||||
|
||||
void LocationInformationWidget::on_diveSiteName_textChanged(const QString& text)
|
||||
{
|
||||
if (!same_string(qPrintable(text), currentDs->name)) {
|
||||
if (!currentDs || !same_string(qPrintable(text), currentDs->name)) {
|
||||
free(displayed_dive_site.name);
|
||||
displayed_dive_site.name = copy_string(qPrintable(text));
|
||||
markChangedWidget(ui.diveSiteName);
|
||||
|
@ -258,7 +258,7 @@ void LocationInformationWidget::on_diveSiteName_textChanged(const QString& text)
|
|||
|
||||
void LocationInformationWidget::on_diveSiteNotes_textChanged()
|
||||
{
|
||||
if (!same_string(qPrintable(ui.diveSiteNotes->toPlainText()), currentDs->notes))
|
||||
if (! currentDs || !same_string(qPrintable(ui.diveSiteNotes->toPlainText()), currentDs->notes))
|
||||
markChangedWidget(ui.diveSiteNotes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue