diff options
author | Robert C. Helling <helling@atdotde.de> | 2014-11-24 15:43:37 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-24 06:50:19 -0800 |
commit | 4a751750e0e18a6c71ee63930faf91b799c53d0b (patch) | |
tree | 1690f8ee7ee6dc3ebf801b8804cda9027d8bc6e7 /qt-ui/profile | |
parent | 79d5a411824510c13012b28d636d4af4790a4efa (diff) | |
download | subsurface-4a751750e0e18a6c71ee63930faf91b799c53d0b.tar.gz |
Reset plot info pointer when painting several polyons
For each polygon that we paint we have to step through the
plot_info from the start again.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/diveprofileitem.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index 8ee0f3494..e2148bf7c 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -685,8 +685,9 @@ void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsIte pen.setCosmetic(true); pen.setWidth(2); painter->save(); - struct plot_data *entry = dataModel->data().entry; + struct plot_data *entry; Q_FOREACH (const QPolygonF &poly, polygons) { + entry = dataModel->data().entry; for (int i = 1, count = poly.count(); i < count; i++, entry++) { pen.setBrush(getSacColor(entry->sac, displayed_dive.sac)); painter->setPen(pen); |