mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 19:41:30 +00:00
Table print: Ignore a dive instead of breaking the dive loop
draw_table(): When get_dive_for_printing() returns NULL, instead of breaking, we should 'continue' trough the entire loop. Otherwise the paginate() handler will be called dive_table.nr times, until it returns TRUE. Fixes a bug where, for example one selected dive can end up allocating dive_table.nr pages for printing. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e8d582dbd4
commit
cb30d6d864
1 changed files with 1 additions and 1 deletions
2
print.c
2
print.c
|
@ -802,7 +802,7 @@ static void draw_table(GtkPrintOperation *operation, GtkPrintContext *context, g
|
||||||
for (i = 0; i < dive_table.nr - nr; i++) {
|
for (i = 0; i < dive_table.nr - nr; i++) {
|
||||||
dive = get_dive_for_printing(nr+i);
|
dive = get_dive_for_printing(nr+i);
|
||||||
if (!dive)
|
if (!dive)
|
||||||
break;
|
continue;
|
||||||
/* Write the dive data and get the max. height of the row */
|
/* Write the dive data and get the max. height of the row */
|
||||||
max_ext = show_dive_table(dive, cr, layout, w*2, delta_y / 4 / PANGO_SCALE, paginate);
|
max_ext = show_dive_table(dive, cr, layout, w*2, delta_y / 4 / PANGO_SCALE, paginate);
|
||||||
/* Draw a frame for each row */
|
/* Draw a frame for each row */
|
||||||
|
|
Loading…
Reference in a new issue