Skip to content

Commit

Permalink
zoomable : fix nb of row computation
Browse files Browse the repository at this point in the history
this fix darktable-org#6160 by avoiding to remove and reload the last line
  • Loading branch information
AlicVB authored and TurboGit committed Sep 1, 2020
1 parent 7c3e329 commit e0265dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dtgtk/thumbtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit e0265dd

Please sign in to comment.