mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
79d5a41182
commit
4a751750e0
1 changed files with 2 additions and 1 deletions
|
@ -685,8 +685,9 @@ void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
|
||||||
pen.setCosmetic(true);
|
pen.setCosmetic(true);
|
||||||
pen.setWidth(2);
|
pen.setWidth(2);
|
||||||
painter->save();
|
painter->save();
|
||||||
struct plot_data *entry = dataModel->data().entry;
|
struct plot_data *entry;
|
||||||
Q_FOREACH (const QPolygonF &poly, polygons) {
|
Q_FOREACH (const QPolygonF &poly, polygons) {
|
||||||
|
entry = dataModel->data().entry;
|
||||||
for (int i = 1, count = poly.count(); i < count; i++, entry++) {
|
for (int i = 1, count = poly.count(); i < count; i++, entry++) {
|
||||||
pen.setBrush(getSacColor(entry->sac, displayed_dive.sac));
|
pen.setBrush(getSacColor(entry->sac, displayed_dive.sac));
|
||||||
painter->setPen(pen);
|
painter->setPen(pen);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue