variable Blattgröße bis zum eingegebenen Maximum

This commit is contained in:
2026-03-26 21:39:41 +01:00
parent b014b92c19
commit 5303a44ce8
+12 -5
View File
@@ -619,17 +619,24 @@ class PrintLogic:
plotgroesse_h = kartenbild_h + 20.0
din_dims = DIN_GROESSEN.get(zielgroesse, DIN_GROESSEN[DIN_STANDARD])
din_w = float(din_dims[0])
din_h = float(din_dims[1])
din_max_h = float(max(din_dims))
if formfaktor:
ziel_w, ziel_h = plotgroesse_w, float(min(din_dims))
ziel_w, ziel_h = plotgroesse_w, min(plotgroesse_h, din_max_h)
else:
ziel_w, ziel_h = float(din_dims[0]), float(din_dims[1])
cap_w, cap_h = din_w, din_h
if not (plotgroesse_w <= cap_w and plotgroesse_h <= cap_h):
if plotgroesse_w <= din_h and plotgroesse_h <= din_w:
cap_w, cap_h = din_h, din_w
ziel_w = min(plotgroesse_w, cap_w)
ziel_h = min(plotgroesse_h, cap_h)
if ziel_w < DIN_GROESSEN["DIN A4"][0] or ziel_h < DIN_GROESSEN["DIN A4"][1]:
self.pruefmanager.zeige_hinweis(
"Blattgroesse zu klein",
"Die Zielgroesse darf nicht kleiner als DIN A4 sein.",
"Blattgroesse kleiner als DIN A4",
"Die Layouterstellung wird trotzdem fortgesetzt.",
)
return {"ok": False, "switch_to_tab_a": False, "atlas_seiten": 0}
if plotgroesse_w > ziel_w or plotgroesse_h > ziel_h:
if plotgroesse_w <= ziel_h and plotgroesse_h <= ziel_w: