From 88fb82411ee142a3ce688ad0c96d4ac73cb89b59 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 22 Sep 2013 07:33:09 -0700 Subject: 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 --- qt-ui/maintab.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-ui/maintab.cpp') 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(); + le->setText(""); } } -- cgit v1.2.3-70-g09d2