From 7c26d67ebf3c44708ba5b40883554b321bd91f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= Date: Mon, 21 Jun 2021 13:33:24 +0200 Subject: [PATCH] Arch: Draw solar diagrams for timezones other than UTC and UTC-3 Use the value of tz parameter to set a timezone instead of -3 constant. Make updates to TimeZone property trigger redrawing of a solar diagram. --- src/Mod/Arch/ArchSite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchSite.py b/src/Mod/Arch/ArchSite.py index e51532cd51..a2eed40cca 100644 --- a/src/Mod/Arch/ArchSite.py +++ b/src/Mod/Arch/ArchSite.py @@ -130,7 +130,7 @@ def makeSolarDiagram(longitude,latitude,scale=1,complete=False,tz=None): else: oldversion = True if tz: - tz = datetime.timezone(datetime.timedelta(hours=-3)) + tz = datetime.timezone(datetime.timedelta(hours=tz)) else: tz = datetime.timezone.utc else: @@ -994,7 +994,7 @@ class _ViewProviderSite: The name of the property that has changed. """ - if prop in ["Longitude","Latitude"]: + if prop in ["Longitude","Latitude","TimeZone"]: self.onChanged(obj.ViewObject,"SolarDiagram") elif prop == "Declination": self.onChanged(obj.ViewObject,"SolarDiagramPosition")