From 63a2e8d63a6aa2e7bf607a174daaa252f4be2efe Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 22 May 2026 08:41:12 +0200 Subject: [PATCH 1/3] =?UTF-8?q?dialogbox=20f=C3=BCr=20BROR-Abfrage=20erg?= =?UTF-8?q?=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions/dialog_wrapper.py | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/functions/dialog_wrapper.py b/functions/dialog_wrapper.py index 170bbc0..988d380 100644 --- a/functions/dialog_wrapper.py +++ b/functions/dialog_wrapper.py @@ -328,3 +328,53 @@ class ProgressDialog: def create_progress_dialog(total: int, title: str = "Fortschritt", label: str = "Verarbeite...") -> ProgressDialog: return ProgressDialog(total, title, label) + +def ask_bror_kombination( + parent: Any, + kombinationen: list[tuple[str, str]], +) -> Optional[tuple[str, str]]: + """Zeigt Dialog zur Auswahl einer BROR-Kombination (adv_name + bezeichnung). + + Wird aufgerufen, wenn der WFS mehrere verschiedene Kombinationen aus + ``adv_name`` und ``bezeichnung`` zurückliefert, sodass der Nutzer + entscheiden muss, welche Objekte in die Pipeline einfließen sollen. + + Parameters + ---------- + parent : + Eltern-Widget oder None. + kombinationen : + Sortierte Liste von ``(adv_name, bezeichnung)``-Tupeln. + + Returns + ------- + Optional[tuple[str, str]] + Das gewählte ``(adv_name, bezeichnung)``-Tupel oder ``None`` bei + Abbruch bzw. leerer Eingabe. + """ + if not kombinationen: + return None + + if QT_VERSION == 0: # Mock-Modus + print(f"Mock-Modus: ask_bror_kombination → {kombinationen[0]}") + return kombinationen[0] + + items = [f"{adv} | {bez}" for adv, bez in kombinationen] + item, ok = QInputDialog.getItem( + parent, + "BROR-Objekt auswählen", + "Mehrere BauRaumOderBodenordnungsrecht-Objekte gefunden.\n" + "Bitte wählen Sie die gewünschte Kombination\n" + "aus ADV-Name und Bezeichnung:", + items, + 0, + False, + ) + if not ok: + return None + try: + idx = items.index(item) + return kombinationen[idx] + except ValueError: + return None + -- 2.54.0 From e196a4896f9fdcc81e1aa680bad20c55f37a24df Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 22 May 2026 08:56:26 +0200 Subject: [PATCH 2/3] Fokusverlust bei Dialogauswahl gefixt --- functions/dialog_wrapper.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/functions/dialog_wrapper.py b/functions/dialog_wrapper.py index 988d380..4c2c589 100644 --- a/functions/dialog_wrapper.py +++ b/functions/dialog_wrapper.py @@ -324,6 +324,22 @@ class ProgressDialog: if self._dlg is not None: self._dlg.close() + def raise_to_front(self) -> None: + """Bringt den Fortschrittsdialog in den Vordergrund. + + Wird aufgerufen, nachdem ein modaler Subdialog (z. B. Auswahlbox) + geschlossen wurde und der Fortschrittsdialog wieder sichtbar sein soll. + """ + if QT_VERSION == 0: + return + if self._dlg is not None: + try: + self._dlg.raise_() + self._dlg.activateWindow() + QCoreApplication.processEvents() + except Exception: + pass + def create_progress_dialog(total: int, title: str = "Fortschritt", label: str = "Verarbeite...") -> ProgressDialog: return ProgressDialog(total, title, label) -- 2.54.0 From 025a5f5e13aefdad0033f795bfcee5580413382b Mon Sep 17 00:00:00 2001 From: daniel Date: Fri, 22 May 2026 14:26:58 +0200 Subject: [PATCH 3/3] Messagebox-Fix "VG" in "Verfahrensgebiet" --- functions/dialog_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/dialog_wrapper.py b/functions/dialog_wrapper.py index 4c2c589..4bd1996 100644 --- a/functions/dialog_wrapper.py +++ b/functions/dialog_wrapper.py @@ -218,7 +218,7 @@ def ask_detailpruefung_oder_vg_laden( msg.setText(message) detail_btn = msg.addButton("Detailprüfung starten", QMessageBox.ButtonRole.AcceptRole) - vg_btn = msg.addButton("Bodenordnungsobjekt als VG laden", QMessageBox.ButtonRole.ActionRole) + vg_btn = msg.addButton("Bodenordnungsobjekt als Verfahrensgebiet laden", QMessageBox.ButtonRole.ActionRole) msg.addButton("Abbrechen", QMessageBox.ButtonRole.RejectRole) exec_dialog(msg) -- 2.54.0