diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-12-24 19:21:30 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-10 15:57:39 -0800 |
commit | 02fbaffe4c5c4e60c2b84b71f4f4b00ecb78ef9f (patch) | |
tree | 07b08e1fa905c097e952e62cac91636163430c70 /profile-widget/profilewidget2.cpp | |
parent | e61466e178e9062a7202f24f609baa12d21df5ea (diff) | |
download | subsurface-02fbaffe4c5c4e60c2b84b71f4f4b00ecb78ef9f.tar.gz |
profile: explicitly clear profile items
In contrast to most other items, which are cleared in the
setEmptyState() function, the profile items are cleared
indirectly via a signal from the model. Very hard to follow
and indeed, I thought I could just remove the slot.
Do this explicitly instead for deterministic code.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r-- | profile-widget/profilewidget2.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index a9d78f5ee..20897b674 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1123,6 +1123,8 @@ void ProfileWidget2::setEmptyState() heartBeatAxis->setVisible(false); heartBeatItem->setVisible(false); #endif + for (AbstractProfilePolygonItem *item: profileItems) + item->clear(); #ifndef SUBSURFACE_MOBILE hideAll(allTissues); |