mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Move profile item to be used as cache.
the profile item should also use the model to know when to change something, this makes it happen. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
563c39b822
commit
43cf4fb984
2 changed files with 12 additions and 14 deletions
|
|
@ -107,6 +107,9 @@ void DiveProfileItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* o
|
|||
|
||||
void DiveProfileItem::modelDataChanged()
|
||||
{
|
||||
if (!hAxis || !vAxis || !dataModel || hDataColumn == -1 || vDataColumn == -1 || dataModel->rowCount() == 0)
|
||||
return;
|
||||
|
||||
AbstractProfilePolygonItem::modelDataChanged();
|
||||
if (polygon().isEmpty())
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue