mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Show the newly split pressures correctly in the equipment page too
NOTE! When *editing* the cylinder data, the only thing shown is the non-sample pressure. So the cylinder editing widget will show zero for start/end pressure for a dive that has pressure saples without any manually set pressure data. This is intentional, so that you can clearly see that this is not a set value. But it may be that we should gray out the spinputton and have an "edit value" checkbox or something to make it really obvious. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
66c04f4f47
commit
049b895d9b
1 changed files with 8 additions and 2 deletions
10
equipment.c
10
equipment.c
|
@ -283,18 +283,24 @@ static int cyl_nothing(cylinder_t *cyl)
|
|||
!cyl->type.description &&
|
||||
!cyl->gasmix.o2.permille &&
|
||||
!cyl->gasmix.he.permille &&
|
||||
!cyl->sample_start.mbar &&
|
||||
!cyl->sample_end.mbar &&
|
||||
!cyl->start.mbar &&
|
||||
!cyl->end.mbar;
|
||||
}
|
||||
|
||||
static void set_one_cylinder(int index, cylinder_t *cyl, GtkListStore *model, GtkTreeIter *iter)
|
||||
{
|
||||
unsigned int start, end;
|
||||
|
||||
start = cyl->start.mbar ? : cyl->sample_start.mbar;
|
||||
end = cyl->end.mbar ? : cyl->sample_end.mbar;
|
||||
gtk_list_store_set(model, iter,
|
||||
CYL_DESC, cyl->type.description ? : "",
|
||||
CYL_SIZE, cyl->type.size.mliter,
|
||||
CYL_WORKP, cyl->type.workingpressure.mbar,
|
||||
CYL_STARTP, cyl->start.mbar,
|
||||
CYL_ENDP, cyl->end.mbar,
|
||||
CYL_STARTP, start,
|
||||
CYL_ENDP, end,
|
||||
CYL_O2, cyl->gasmix.o2.permille,
|
||||
CYL_HE, cyl->gasmix.he.permille,
|
||||
-1);
|
||||
|
|
Loading…
Add table
Reference in a new issue