fix missing xml config
This commit is contained in:
@ -513,7 +513,11 @@ public class MainWindowController {
|
|||||||
xmlc.setHeader(tftheader.getText());
|
xmlc.setHeader(tftheader.getText());
|
||||||
xmlc.setFooter(tftfooter.getText());
|
xmlc.setFooter(tftfooter.getText());
|
||||||
xmlc.setCategorySplitted(switchSeparate.isSelected());
|
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 {
|
try {
|
||||||
xmlc.saveSettings();
|
xmlc.saveSettings();
|
||||||
@ -870,7 +874,10 @@ public class MainWindowController {
|
|||||||
|
|
||||||
switchSeparate.setSelected(xmlc.getCategorySplitted());
|
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();
|
updatePrintButtonLabel();
|
||||||
|
|
||||||
@ -881,7 +888,7 @@ public class MainWindowController {
|
|||||||
btnPrintBill.setText("Drucken");
|
btnPrintBill.setText("Drucken");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
btnPrintBill.setText("Bestellen");
|
btnPrintBill.setText("Buchen");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user