Projektdaten in Project-Settings + Swisstopo-Adress-Prefill

Schema-Erweiterung:
- _PROJECT_SETTINGS_DEFAULTS hat jetzt 'project'-Block mit
  name / number / address / bauherr / architekt / notes / projectZeroMum
- _normalize_project_meta stripped Strings + clampt mum als float
- load/save_project_settings handeln das 'project'-feld
- save_project_settings spiegelt projectZeroMum auch in den Legacy-Key
  dossier_project_zero_mum (fuer Geschoss-Settings-Dialog)
- load_project_settings liest Legacy-Key als Fallback wenn neuer Wert
  noch nicht gesetzt

UI:
- InlineTextField + TextareaField Helpers (Pill-Stil)
- Projektdaten-Section in Voreinstellungen-Tab:
  Name, Projekt-Nr., Adresse, Bauherrschaft, Architekt:in,
  EG-Nullpunkt m.ü.M (mit Hinweis auf Swisstopo-Nutzung), Notizen

Swisstopo:
- _cmd_open_swisstopo_dialog laedt Projekt-Adresse + sendet projectAddress
  im SWISSTOPO_STATE
- SwisstopoApp: vorbelegt searchText mit projectAddress wenn Feld leer
  ist (User-Input wird nicht ueberschrieben)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 03:21:19 +02:00
parent a597b58c93
commit 8f691e37c4
4 changed files with 164 additions and 22 deletions
+9
View File
@@ -8217,6 +8217,14 @@ class ElementeBridge(panel_base.BaseBridge):
e_raw = doc.Strings.GetValue("dossier_ebenen") if doc else None
ebenen = json.loads(e_raw) if e_raw else []
except Exception: ebenen = []
# Projekt-Adresse als Vorschlag fuer die Adress-Suche
project_address = ""
try:
import rhinopanel
ps = rhinopanel.load_project_settings(doc) if doc else None
if isinstance(ps, dict):
project_address = (ps.get("project", {}) or {}).get("address") or ""
except Exception: pass
class _SwisstopoBridge(panel_base.BaseBridge):
def __init__(self):
@@ -8225,6 +8233,7 @@ class ElementeBridge(panel_base.BaseBridge):
self.send("SWISSTOPO_STATE", {
"ebenen": ebenen,
"cacheDir": __import__("swisstopo").CACHE_DIR,
"projectAddress": project_address,
})
def _push_log(self, msg):
try: self.send("SWISSTOPO_LOG", {"msg": str(msg)})