Wrappe modular aufgebaut, Tests erfolgreich, Menüleiste und Werzeugleiste werden eingetragen (QT6 und QT5)- (Es fehlen noch Fachplugins, um zu prüfen, ob es auch wirklich in QGIS geht)

This commit is contained in:
2025-12-19 14:29:52 +01:00
parent e8fea163b5
commit f88b5da51f
37 changed files with 1886 additions and 1679 deletions

View File

@@ -0,0 +1,20 @@
# sn_basis/functions/ly_existence_wrapper.py
def layer_exists(layer) -> bool:
if layer is None:
return False
is_valid_flag = getattr(layer, "is_valid", None)
if is_valid_flag is not None:
try:
return bool(is_valid_flag)
except Exception:
return False
try:
is_valid = getattr(layer, "isValid", None)
if callable(is_valid):
return bool(is_valid())
return True
except Exception:
return False