aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-02-10 14:41:59 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-10 09:57:04 -0800
commitcafc7e4b1338156c9a3294a8f1037b5a31fffdbb (patch)
tree5a543404a6ec221b0450865409801584ec1ce7f5 /qt-ui/profile/profilewidget2.cpp
parent2f2c9e371ceeba4cf45575b5a30815bcd562f853 (diff)
downloadsubsurface-cafc7e4b1338156c9a3294a8f1037b5a31fffdbb.tar.gz
Clear the data when the model resets.
This patch does a few things: 1 - reset the model when user closes the dive file 2 - connects the 'rowsAboutToBeRemoved' in a way that the graphics can remove their polygons too 3 - adds a 'clear' virtual method so items that don't follow the rules can clean themseves up. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-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 7db90886e..69ec8b9e2 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -432,6 +432,7 @@ void ProfileWidget2::setEmptyState()
if (currentState == EMPTY)
return;
+ dataModel->clear();
backgroundFile = QString(":poster%1").arg( rand()%3 +1);
currentState = EMPTY;
fixBackgroundPos();