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>
This commit is contained in:
Stefan Fuchs 2017-10-08 21:43:30 +02:00 committed by Robert C. Helling
parent f9d05a8038
commit c3857db23b

View file

@ -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);