Skip to content

Commit

Permalink
Fix thumbnail size during scale transition
Browse files Browse the repository at this point in the history
When page format is changed the thumbnail will not have the right size
until the thumbnail is re-rendered. This commit changes resample so
that thumbnail is scaled until it is re-rendered.
  • Loading branch information
kbengs committed Mar 28, 2021
1 parent 250cbc5 commit 6e04713
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pdfarranger/croputils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def scale(model, selection, factor):
f = min(f, 14400 / page.size[0], 14400 / page.size[1])
if page.scale != f:
changed = True
page.resample = page.resample * f / page.scale
page.scale = f
model.set_value(it, 0, page)
return changed
Expand Down

0 comments on commit 6e04713

Please sign in to comment.