From 48db63736b246a4731e8f907cd0990388862b8df Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 23 Feb 2014 08:33:58 -0800 Subject: Don't try to set visibility of events before they have been added Admittedly this code doesn't do anything useful right now, but at least have it not to anything useful in the right spot. Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index ca0bdec2b..9152f1c76 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -392,7 +392,10 @@ void ProfileWidget2::plotDives(QList dives) eventItems.push_back(item); event = event->next; } - + // Only set visible the ones that should be visible, but how? + Q_FOREACH(DiveEventItem *event, eventItems){ + event->setVisible(true); + } diveComputerText->setText(currentdc->model); } @@ -563,10 +566,6 @@ void ProfileWidget2::setProfileState() tissue->setVisible(true); } } - // Only set visible the ones that should be visible, but how? - Q_FOREACH(DiveEventItem *event, eventItems){ - event->setVisible(true); - } } extern struct ev_select *ev_namelist; -- cgit v1.2.3-70-g09d2