Skip to content

Commit

Permalink
Remove unused import and thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
kbengs authored and jeromerobert committed Apr 15, 2023
1 parent e960131 commit 158bd63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions pdfarranger/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def duplicate(self, incl_thumbnail=True):
r = copy.copy(self)
r.crop = list(r.crop)
r.size = list(r.size)
r.layerpages = [lp.duplicate(incl_thumbnail) for lp in r.layerpages]
r.layerpages = [lp.duplicate() for lp in r.layerpages]
if incl_thumbnail == False:
del r.thumbnail # to save ram
r.thumbnail = None
Expand Down Expand Up @@ -187,7 +187,6 @@ class LayerPage:
"""Page added as overlay or underlay on a Page."""

def __init__(self, nfile, npage, copyname, angle, scale, crop, offset, laypos, size):
self.thumbnail = None
self.nfile = nfile
self.npage = npage
self.copyname = copyname
Expand Down Expand Up @@ -242,13 +241,10 @@ def serialize(self):
ts += list(self.crop) + list(self.offset)
return "\n".join([str(v) for v in ts])

def duplicate(self, incl_thumbnail=True):
def duplicate(self):
r = copy.copy(self)
r.crop = list(r.crop)
r.offset = list(r.offset)
if incl_thumbnail == False:
del r.thumbnail # to save ram
r.thumbnail = None
return r


Expand Down
2 changes: 1 addition & 1 deletion pdfarranger/pdfarranger.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _set_language_locale():
from . import pageutils
from . import splitter
from .iconview import CellRendererImage, IconviewCursor, IconviewDragSelect, IconviewPanView
from .core import img2pdf_supported_img, PageAdder, PDFDocError, PDFRenderer, LayerPage
from .core import img2pdf_supported_img, PageAdder, PDFDocError, PDFRenderer
GObject.type_register(CellRendererImage)

layer_support = exporter.layer_support()
Expand Down

0 comments on commit 158bd63

Please sign in to comment.