mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
profile: set empty state when there is no current dive to show
The profile data was not properly cleared when not showing a dive. Fixes #2787 Reported-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5ba7c68433
commit
142dc6f96f
1 changed files with 3 additions and 1 deletions
|
@ -566,8 +566,10 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict
|
||||||
#endif
|
#endif
|
||||||
if (currentState != ADD && currentState != PLAN) {
|
if (currentState != ADD && currentState != PLAN) {
|
||||||
if (!d) {
|
if (!d) {
|
||||||
if (!current_dive)
|
if (!current_dive) {
|
||||||
|
setEmptyState();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
d = current_dive; // display the current dive
|
d = current_dive; // display the current dive
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue