diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2014-01-23 15:44:12 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-23 21:11:14 -0800 |
commit | 563c39b8221ac2e3730c9f51a0e890b42af8ca78 (patch) | |
tree | 031ad3beaa36cf44fe263e05b3a572e1ecaae4ac /qt-ui/profile/diveprofileitem.cpp | |
parent | 555ca8245d5675bc943a2a0786d4c0168344161c (diff) | |
download | subsurface-563c39b8221ac2e3730c9f51a0e890b42af8ca78.tar.gz |
Moved the temperature item as a 'Cache'
This patch moves the temperature item as a cache that will
be updated as the model updates, instead of deleting / recreating
it everytime the dive changes.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/diveprofileitem.cpp')
-rw-r--r-- | qt-ui/profile/diveprofileitem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index 25d6a8415..f00fff688 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -192,7 +192,7 @@ DiveTemperatureItem::DiveTemperatureItem() void DiveTemperatureItem::modelDataChanged() { // We don't have enougth data to calculate things, quit. - if (!hAxis || !vAxis || !dataModel || hDataColumn == -1 || vDataColumn == -1) + if (!hAxis || !vAxis || !dataModel || hDataColumn == -1 || vDataColumn == -1 || dataModel->rowCount() == 0) return; qDeleteAll(texts); |