From 02fbaffe4c5c4e60c2b84b71f4f4b00ecb78ef9f Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 24 Dec 2020 19:21:30 +0100 Subject: 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 --- profile-widget/profilewidget2.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'profile-widget/profilewidget2.cpp') 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); -- cgit v1.2.3-70-g09d2