Reset state: have a correct dive site being displayed
I'm not sure if this is the right approach, but it seems to work: when we reset the state of the widget, we try to get the current dive site from the current dive, and set it. This way it will work for the globe later. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3561d34745
commit
db333226d9
@ -144,6 +144,12 @@ void LocationInformationWidget::markChangedWidget(QWidget *w)
|
||||
|
||||
void LocationInformationWidget::resetState()
|
||||
{
|
||||
if (displayed_dive.id) {
|
||||
struct dive_site *ds = get_dive_site_by_uuid(displayed_dive.dive_site_uuid);
|
||||
if(ds) {
|
||||
displayed_dive_site = *ds;
|
||||
}
|
||||
}
|
||||
modified = false;
|
||||
resetPallete();
|
||||
MainWindow::instance()->dive_list()->setEnabled(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user