mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:13:25 +00:00
Imitialize gc y range for GF factor print
It seemed so smart to just base the coordinates on what's already in the graphics context. Except that we apparently got a 0 to 0 range for y coordinates if there are no pressure samples for a dive. This fixes the problem and GF values are shown even for dives without pressure samples. Reported-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3e426283b4
commit
4ddea283a5
1 changed files with 2 additions and 1 deletions
|
@ -1137,8 +1137,9 @@ static void plot_deco_text(struct graphics_context *gc, struct plot_info *pi)
|
|||
{
|
||||
if (prefs.profile_calc_ceiling) {
|
||||
float x = gc->leftx + (gc->rightx - gc->leftx) / 2;
|
||||
float y = gc->topy;
|
||||
float y = gc->topy = 1.0;
|
||||
text_render_options_t tro = {10, PRESSURE_TEXT, CENTER, -0.2};
|
||||
gc->bottomy = 0.0;
|
||||
plot_text(gc, &tro, x, y, "GF %.0f/%.0f", prefs.gflow * 100, prefs.gfhigh * 100);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue