Farbgebung BauRaumOderBodenordnungsrecht gefixt (auf qml umgestellt)
This commit is contained in:
+2
-29
@@ -169,9 +169,9 @@ class WorkingTab(QWidget):
|
||||
apply_style(flst_layer, "GIS_Flst_Beschriftung_ALKIS_NAS.qml")
|
||||
self.setze_haken(self.haken_flurst, True)
|
||||
|
||||
# BROR-Layer: einfache Darstellung setzen (roter Umring, transparent)
|
||||
# BROR-Layer: QML-Stil anwenden
|
||||
if bror_layer and bror_layer.isValid():
|
||||
_setze_bror_stil(bror_layer)
|
||||
apply_style(bror_layer, "BauRaumOderBodenordnungsrecht.qml")
|
||||
|
||||
# Enriched VG-Layer ins Projekt (ggf. bereits registriert, z.B. bei "als VG laden")
|
||||
if not project.mapLayer(enriched_layer.id()):
|
||||
@@ -547,31 +547,4 @@ class WorkingTab(QWidget):
|
||||
# Modul-Hilfsfunktionen
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
def _setze_bror_stil(layer) -> None:
|
||||
"""Setzt eine einfache Darstellung für den BauRaumOrdnungsrecht-Layer.
|
||||
|
||||
Roter Umring, halbtransparente Füllung; kein QGIS-Kontext → stilles Ignorieren.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
layer :
|
||||
BauRaumOrdnungsrecht-Memory-Layer (Polygon).
|
||||
"""
|
||||
try:
|
||||
from qgis.core import ( # type: ignore[import]
|
||||
QgsSimpleFillSymbolLayer,
|
||||
QgsFillSymbol,
|
||||
QgsSingleSymbolRenderer,
|
||||
)
|
||||
from qgis.PyQt.QtGui import QColor # type: ignore[import]
|
||||
from qgis.PyQt.QtCore import Qt # type: ignore[import]
|
||||
|
||||
fill = QgsSimpleFillSymbolLayer()
|
||||
fill.setColor(QColor(220, 50, 50, 40)) # halbtransparent rot
|
||||
fill.setStrokeColor(QColor(220, 50, 50))
|
||||
fill.setStrokeWidth(0.8)
|
||||
symbol = QgsFillSymbol([fill])
|
||||
layer.setRenderer(QgsSingleSymbolRenderer(symbol))
|
||||
layer.triggerRepaint()
|
||||
except Exception:
|
||||
pass # Kein QGIS-Kontext (Tests, Mock-Modus) → Standarddarstellung
|
||||
|
||||
Reference in New Issue
Block a user