neues Layout "Baufreigabe" hinzugefügt
This commit is contained in:
@@ -5,6 +5,7 @@ Die Anwendung erfolgt später über eine Aktion.
|
||||
"""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from sn_basis.functions.os_wrapper import is_absolute_path
|
||||
from sn_basis.functions.sys_wrapper import get_plugin_root, file_exists, join_path
|
||||
@@ -43,7 +44,7 @@ class Stilpruefer:
|
||||
|
||||
pfad = str(stil_pfad)
|
||||
|
||||
if not is_absolute_path(pfad):
|
||||
if not is_absolute_path(pfad) and not pfad.startswith(("/", "\\")):
|
||||
plugin_root = get_plugin_root()
|
||||
pfad = str(join_path(plugin_root, "sn_plan41", "assets", pfad))
|
||||
|
||||
@@ -55,7 +56,7 @@ class Stilpruefer:
|
||||
ok=False,
|
||||
meldung=f"Die Stil-Datei '{stil_pfad}' wurde nicht gefunden.",
|
||||
aktion="datei_nicht_gefunden",
|
||||
kontext=pfad,
|
||||
kontext=Path(pfad),
|
||||
)
|
||||
|
||||
# -----------------------------------------------------
|
||||
@@ -66,7 +67,7 @@ class Stilpruefer:
|
||||
ok=False,
|
||||
meldung="Die Stil-Datei muss die Endung '.qml' haben.",
|
||||
aktion="falsche_endung",
|
||||
kontext=pfad,
|
||||
kontext=Path(pfad),
|
||||
)
|
||||
|
||||
# -----------------------------------------------------
|
||||
@@ -76,5 +77,5 @@ class Stilpruefer:
|
||||
ok=True,
|
||||
meldung="Stil-Datei ist gültig.",
|
||||
aktion="stil_anwendbar",
|
||||
kontext=pfad,
|
||||
kontext=Path(pfad),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user