summaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2017-10-08 21:43:30 +0200
committerGravatar Robert C. Helling <helling@atdotde.de>2017-10-08 23:19:23 +0200
commitc3857db23bdd21469762ea1a5b6f2f20a52ca15e (patch)
tree867f7873ff8e0f9d5d4cb2cbe0f00e2a46203508 /profile-widget
parentf9d05a803875e947cebc7596d9ba078302c3f75f (diff)
downloadsubsurface-c3857db23bdd21469762ea1a5b6f2f20a52ca15e.tar.gz
Hide outdated gas name strings in profile in planner
When deleting dive planner points in the planner we currently sometimes miss to hide the outdated gas name strings printed close to the profile legs. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/profilewidget2.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index e87620c9a..1d25c8261 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -1756,6 +1756,9 @@ void ProfileWidget2::pointsRemoved(const QModelIndex &, int start, int end)
void ProfileWidget2::repositionDiveHandlers()
{
DivePlannerPointsModel *plannerModel = DivePlannerPointsModel::instance();
+ #define HIDE_ALL(TYPE, CONTAINER) \
+ Q_FOREACH (TYPE *item, CONTAINER) item->setVisible(false);
+ HIDE_ALL(QGraphicsSimpleTextItem, gases);
// Re-position the user generated dive handlers
for (int i = 0; i < plannerModel->rowCount(); i++) {
struct divedatapoint datapoint = plannerModel->at(i);