mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
555ca8245d
commit
563c39b822
2 changed files with 10 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue