Merge pull request #138 from jschwab/fix-panning-bug

Fix case in which x and y are not specified in panning
This commit is contained in:
Phillip Berndt 2019-02-17 12:49:10 +01:00 committed by GitHub
commit 9255c2f705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -656,9 +656,9 @@ def get_fb_dimensions(configuration):
if "panning" in output.options: if "panning" in output.options:
match = re.match("(?P<w>[0-9]+)x(?P<h>[0-9]+)(?:\+(?P<x>[0-9]+))?(?:\+(?P<y>[0-9]+))?.*", output.options["panning"]) match = re.match("(?P<w>[0-9]+)x(?P<h>[0-9]+)(?:\+(?P<x>[0-9]+))?(?:\+(?P<y>[0-9]+))?.*", output.options["panning"])
if match: if match:
detail = match.groupdict() detail = match.groupdict(default="0")
o_width = int(detail.get("w")) + int(detail.get("x", "0")) o_width = int(detail.get("w")) + int(detail.get("x"))
o_height = int(detail.get("h")) + int(detail.get("y", "0")) o_height = int(detail.get("h")) + int(detail.get("y"))
width = max(width, o_width) width = max(width, o_width)
height = max(height, o_height) height = max(height, o_height)
return int(width), int(height) return int(width), int(height)