mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue