mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Move the 'getSacColor' out of old profile and use it.
This patch makes the color of the cylinder pressure use the sac colors. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
303badd5ce
commit
fcc17c717d
3 changed files with 18 additions and 3 deletions
|
|
@ -359,9 +359,11 @@ void DiveGasPressureItem::paint(QPainter* painter, const QStyleOptionGraphicsIte
|
|||
QPen pen;
|
||||
pen.setCosmetic(true);
|
||||
pen.setWidth(2);
|
||||
struct dive *d = getDiveById(dataModel->id());
|
||||
struct plot_data *entry = dataModel->data();
|
||||
Q_FOREACH(const QPolygonF& poly, polygons) {
|
||||
for (int i = 1, count = poly.count(); i < count; i++) {
|
||||
pen.setBrush(QBrush(Qt::red)); // TODO: Fix the color.
|
||||
for (int i = 1, count = poly.count(); i < count; i++, entry++) {
|
||||
pen.setBrush(getSacColor(entry->sac, d->sac));
|
||||
painter->setPen(pen);
|
||||
painter->drawLine(poly[i-1],poly[i]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue