fix missing xml config

This commit is contained in:
2026-03-01 19:10:07 +01:00
parent c241964a8b
commit 6330d7fd51

View File

@ -513,7 +513,11 @@ public class MainWindowController {
xmlc.setHeader(tftheader.getText());
xmlc.setFooter(tftfooter.getText());
xmlc.setCategorySplitted(switchSeparate.isSelected());
xmlc.setAutoPrintBill(switchAutoPrint.isSelected());
// Only save if checkbox exists (might be null if FXML not updated)
if (switchAutoPrint != null) {
xmlc.setAutoPrintBill(switchAutoPrint.isSelected());
}
try {
xmlc.saveSettings();
@ -870,7 +874,10 @@ public class MainWindowController {
switchSeparate.setSelected(xmlc.getCategorySplitted());
switchAutoPrint.setSelected(xmlc.getAutoPrintBill());
// Only set if checkbox exists (might be null if FXML not updated)
if (switchAutoPrint != null) {
switchAutoPrint.setSelected(xmlc.getAutoPrintBill());
}
updatePrintButtonLabel();
@ -881,7 +888,7 @@ public class MainWindowController {
btnPrintBill.setText("Drucken");
}
else {
btnPrintBill.setText("Bestellen");
btnPrintBill.setText("Buchen");
}
}
@ -1399,4 +1406,4 @@ public class MainWindowController {
return 404;
}
}
}