Attempt to change zoom level only when the current value differs from saved.

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-05-17 18:31:13 +02:00
parent f367c7809f
commit 812d8f20cb
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07

View File

@ -93,9 +93,13 @@ class AutoZoomer(QtCore.QObject):
if host in self.data.keys(): if host in self.data.keys():
if self.data[host]["active"]: if self.data[host]["active"]:
if view.zoomLevel() != self.data[host]["zoom"]:
view.setZoomLevel(self.data[host]["zoom"]) view.setZoomLevel(self.data[host]["zoom"])
elif self.config["defaultZoom"]: elif self.config["defaultZoom"]:
view.setZoomLevel(Falkon.Settings.staticSettings().defaultZoomLevel) defaultZoom = Falkon.Settings.staticSettings().defaultZoomLevel
if view.zoomLevel() != defaultZoom:
view.setZoomLevel(defaultZoom)
def addItem(self, host, zoom=6, active=True): def addItem(self, host, zoom=6, active=True):
if not host: if not host: