crash beim speichern und beenden (themen-Auswahl) behoben

This commit is contained in:
2026-03-23 11:08:25 +01:00
parent 744c5e482a
commit ed1e8cf28b
2 changed files with 23 additions and 13 deletions
+8 -3
View File
@@ -58,14 +58,19 @@ class Layout:
"size_mm": (60.0, 8.0),
"format": "Format_1",
},
"textfeld": {
"id": "Textfeld",
"size_mm": (60.0, 8.0),
"format": "Format_1",
},
}
_QUELLENANGABE_TEXT = (
"Quelle Geobasisdaten: GeoSN, "
"<a href=\"https://www.govdata.de/dl-de/by-2-0\">dl-de/by-2-0</a><br><br>"
"<a href=\"https://www.govdata.de/dl-de/by-2-0\">dl-de/by-2-0</a><br>"
"Quelle Fachdaten: Darstellung auf der Grundlage von Daten und mit Erlaubnis des "
"Sächsischen Landesamtes für Umwelt, Landwirtschaft und Geologie<br><br>"
"Basemap:<br><br>"
"Sächsischen Landesamtes für Umwelt, Landwirtschaft und Geologie<br>"
"Basemap:"
"© GeoBasis-DE / <a href=\"https://www.bkg.bund.de\">BKG</a> ([%year($now)%]) "
"<a href=\"https://creativecommons.org/licences/by/4.0/\">CC BY 4.0</a> "
"mit teilweise angepasster Signatur<br>"
+15 -10
View File
@@ -335,17 +335,22 @@ class TabB(QWidget):
def _disconnect_theme_collection_signals(self) -> None:
"""Trennt Signale der alten Theme-Collection sauber."""
collection = self._connected_theme_collection
if collection is None:
return
for signal_name in ("mapThemesChanged", "changed", "themeChanged"):
signal = getattr(collection, signal_name, None)
if signal is None:
continue
try:
signal.disconnect(self._refresh_thema_combo_live)
except Exception:
pass
if collection is not None:
for signal_name in ("mapThemesChanged", "changed", "themeChanged"):
try:
signal = getattr(collection, signal_name, None)
except RuntimeError:
break
except Exception:
continue
if signal is None:
continue
try:
signal.disconnect(self._refresh_thema_combo_live)
except Exception:
pass
self._connected_theme_collection = None
self._theme_signal_connected = False
def _connect_theme_collection_signals(self) -> None:
"""Verbindet Signale der Theme-Collection für Live-Aktualisierung der Themenliste."""