Changeset b8e044d in subsurface for qt-models


Ignore:
Timestamp:
Mar 11, 2017, 7:27:18 AM (9 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
7f8c3592
Parents:
ab887e4
git-author:
Stefan Fuchs <sfuchs@…> (03/10/17 22:43:30)
git-committer:
Dirk Hohndel <dirk@…> (03/11/17 07:27:18)
Message:

Don't erroneously mark the cylinder pressure red and set font italic

In the cylinder table today the cylinder start and end pressure fields
are marked red and the end pressure font is set to italic if cyl->end is 0.
But sometimes with planned dives there is no cyl->end but only cyl->sample_end.
This is taken into account now.

Signed-off-by: Stefan Fuchs <sfuchs@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qt-models/cylindermodel.cpp

    rab887e4 rb8e044d  
    144144                case START:
    145145                case END:
    146                         if ((cyl->start.mbar && !cyl->end.mbar) ||
     146                        if ((cyl->start.mbar && !cyl->end.mbar && !cyl->sample_end.mbar) ||
    147147                                        (cyl->end.mbar && cyl->start.mbar <= cyl->end.mbar))
    148148                                ret = REDORANGE1_HIGH_TRANS;
     
    158158                        break;
    159159                case END:
    160                         font.setItalic(!cyl->end.mbar);
     160                        font.setItalic(!cyl->end.mbar && !cyl->sample_end.mbar);
    161161                        break;
    162162                }
Note: See TracChangeset for help on using the changeset viewer.