From e0265dd1f79174aa2b25b3e6a43986868fcb8553 Mon Sep 17 00:00:00 2001 From: AlicVB Date: Tue, 1 Sep 2020 19:23:53 +0200 Subject: [PATCH] zoomable : fix nb of row computation this fix #6160 by avoiding to remove and reload the last line --- src/dtgtk/thumbtable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dtgtk/thumbtable.c b/src/dtgtk/thumbtable.c index ae6b7610411b..44a18255f20d 100644 --- a/src/dtgtk/thumbtable.c +++ b/src/dtgtk/thumbtable.c @@ -379,7 +379,7 @@ static gboolean _compute_sizes(dt_thumbtable_t *table, gboolean force) table->view_width = allocation.width; table->view_height = allocation.height; table->thumb_size = table->view_width / npr; - table->rows = table->view_height / table->thumb_size + 1; + table->rows = (table->view_height - table->thumbs_area.y) / table->thumb_size + 1; table->center_offset = 0; ret = TRUE; } @@ -1804,7 +1804,7 @@ void dt_thumbtable_full_redraw(dt_thumbtable_t *table, gboolean force) _pos_compute_area(table); // we need to ensure there's no need to load other image on top/bottom - if(table->mode == DT_THUMBTABLE_MODE_ZOOM) _thumbs_load_needed(table); + if(table->mode == DT_THUMBTABLE_MODE_ZOOM) nbnew += _thumbs_load_needed(table); if(g_slist_length(darktable.view_manager->active_images) > 0 && (table->mode == DT_THUMBTABLE_MODE_ZOOM || table->mode == DT_THUMBTABLE_MODE_FILEMANAGER))