Check zoom percentage is >= 0%

This commit is contained in:
Florian Bruhin 2014-05-15 15:41:54 +02:00
parent 8b13658eaf
commit 537c45f518

View File

@ -251,6 +251,8 @@ class WebView(QWebView):
"""
if fuzzyval:
self._zoom.fuzzyval = int(perc)
if perc < 0:
raise CommandError("Can't zoom {}%!".format(perc))
self.setZoomFactor(float(perc) / 100)
message.info("Zoom level: {}%".format(perc))