summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-05 11:42:19 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-05 11:42:19 -0700
commit3adbff2320b90bbf27b1bedb540ec3d74fb30f9b (patch)
tree87c4c9850728a3fd8db7a8d549c0c0067ef1e66d
parent4a76c3b8df13411bfca7c2fe7008684bb6a4ac4a (diff)
downloadsubsurface-3adbff2320b90bbf27b1bedb540ec3d74fb30f9b.tar.gz
Picture handling: hide the pictures before deleting
Because of the way deleteLater() is implemented, the pictures need to be hidden, otherwise they might stay around at the wrong time (e.g., when printing). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/profile/profilewidget2.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 6a99ff99e..3b37e4115 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -1349,6 +1349,7 @@ void ProfileWidget2::keyEscAction()
void ProfileWidget2::plotPictures()
{
Q_FOREACH(DivePictureItem *item, pictures){
+ item->hide();
item->deleteLater();
}
pictures.clear();