aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index 2d4ba6403..62d818183 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -589,6 +589,7 @@ void MainTab::updateDiveInfo(bool clear)
ui.locationTags->hide();
else
ui.locationTags->show();
+ ui.editDiveSiteButton->setEnabled(!ui.location->text().isEmpty());
/* unset the special value text for date and time, just in case someone dove at midnight */
ui.dateEdit->setSpecialValueText(QString(""));
ui.timeEdit->setSpecialValueText(QString(""));
@@ -969,7 +970,7 @@ void MainTab::acceptChanges()
weightModel->changed = false;
MainWindow::instance()->setEnabledToolbar(true);
acceptingEdit = false;
- ui.editDiveSiteButton->setEnabled(true);
+ ui.editDiveSiteButton->setEnabled(!ui.location->text().isEmpty());
}
void MainTab::resetPallete()
@@ -1045,7 +1046,7 @@ void MainTab::rejectChanges()
weightModel->changed = false;
cylindersModel->updateDive();
weightModel->updateDive();
- ui.editDiveSiteButton->setEnabled(true);
+ ui.editDiveSiteButton->setEnabled(!ui.location->text().isEmpty());
}
#undef EDIT_TEXT2