mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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@gmx.de>
This commit is contained in:
parent
ab887e4438
commit
b8e044dee3
1 changed files with 2 additions and 2 deletions
|
@ -143,7 +143,7 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const
|
|||
// seem implausible
|
||||
case START:
|
||||
case END:
|
||||
if ((cyl->start.mbar && !cyl->end.mbar) ||
|
||||
if ((cyl->start.mbar && !cyl->end.mbar && !cyl->sample_end.mbar) ||
|
||||
(cyl->end.mbar && cyl->start.mbar <= cyl->end.mbar))
|
||||
ret = REDORANGE1_HIGH_TRANS;
|
||||
break;
|
||||
|
@ -157,7 +157,7 @@ QVariant CylindersModel::data(const QModelIndex &index, int role) const
|
|||
font.setItalic(!cyl->start.mbar);
|
||||
break;
|
||||
case END:
|
||||
font.setItalic(!cyl->end.mbar);
|
||||
font.setItalic(!cyl->end.mbar && !cyl->sample_end.mbar);
|
||||
break;
|
||||
}
|
||||
ret = font;
|
||||
|
|
Loading…
Reference in a new issue