mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Don't clear the underline model of the combobox
Clear was the right method to call when we used a line edit, and the line edit didn't had a model to provide data. Calling clear() on a QComboBox will delete all itens inside of it, and what we wanted was to choose an invalid index - and that's -1 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
744ab4bc48
commit
a0c396f5cf
1 changed files with 2 additions and 2 deletions
|
@ -229,7 +229,7 @@ void MainTab::setCurrentLocationIndex()
|
|||
if (ds)
|
||||
ui.location->setCurrentText(ds->name);
|
||||
else
|
||||
ui.location->setCurrentText("");
|
||||
ui.location->setCurrentIndex(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -491,7 +491,7 @@ void MainTab::updateDiveInfo(bool clear)
|
|||
if (ds)
|
||||
ui.location->setCurrentText(ds->name);
|
||||
else
|
||||
ui.location->clear();
|
||||
ui.location->setCurrentIndex(-1);
|
||||
// Subsurface always uses "local time" as in "whatever was the local time at the location"
|
||||
// so all time stamps have no time zone information and are in UTC
|
||||
QDateTime localTime = QDateTime::fromTime_t(displayed_dive.when - gettimezoneoffset(displayed_dive.when));
|
||||
|
|
Loading…
Reference in a new issue