summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-22 07:33:09 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-22 07:33:09 -0700
commit88fb82411ee142a3ce688ad0c96d4ac73cb89b59 (patch)
tree7b700b9740bbf8a3eeb2c4387ee337e2a6a0cead /qt-ui
parent765e5b76e6089d12e2328bfc058f27e187076bd4 (diff)
downloadsubsurface-88fb82411ee142a3ce688ad0c96d4ac73cb89b59.tar.gz
Hack to clear the date when no dive is displayed
This mostly happens with no XML file or when closing the current XML file. Sadly the user still can click on the empty date field (even if nothing else is active on the screen) and a date reappears. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 3af6a0f40..406e09a50 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -355,6 +355,9 @@ void MainTab::updateDiveInfo(int dive)
ui->tempLimits->clear();
ui->totalTimeAllText->clear();
ui->timeLimits->clear();
+ /* turns out this is non-trivial for a dateTimeEdit... this is a partial hack */
+ QLineEdit *le = ui->dateTimeEdit->findChild<QLineEdit*>();
+ le->setText("");
}
}