mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Move the creation of the Gas Pressure item to the constructor
This makes the Gas Pressure Item a 'cached' item, when the dive changes, the item will regenerate the drawing based on it's model. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2f0b778f92
commit
2c2d3351ac
2 changed files with 10 additions and 14 deletions
|
|
@ -258,7 +258,7 @@ void DiveTemperatureItem::paint(QPainter* painter, const QStyleOptionGraphicsIte
|
|||
void DiveGasPressureItem::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;
|
||||
int last_index = -1;
|
||||
int lift_pen = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue