Set default value for digits per group if loaded invalid value
This commit is contained in:
@ -134,6 +134,11 @@ public class MainController implements Initializable {
|
||||
xmlMapper.writeValue(new File(filePath.toString()), settings);
|
||||
} else {
|
||||
settings = xmlMapper.readValue(new File(filePath.toString()), MainSettings.class);
|
||||
for (StationSettings station : settings.getStations()) {
|
||||
if (station.getDigitsPerGroup() == 0) {
|
||||
station.setDigitsPerGroup(4);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// Print the contents of filePath
|
||||
|
Reference in New Issue
Block a user