forked from j62/ctbrec
1
0
Fork 0

Add validation for recording state

This commit is contained in:
0xboobface 2018-12-10 14:32:33 +01:00
parent 605b62ca0e
commit b715fba836
1 changed files with 3 additions and 0 deletions

View File

@ -201,6 +201,9 @@ public class ActionSettingsPanel extends TitledPane {
if(event.getValue() == Event.Type.MODEL_STATUS_CHANGED && modelState.getValue() == null) {
throw new IllegalStateException("Select a state");
}
if(event.getValue() == Event.Type.RECORDING_STATUS_CHANGED && recordingState.getValue() == null) {
throw new IllegalStateException("Select a state");
}
if(modelSelectionPane.getSelectedItems().isEmpty() && !modelSelectionPane.isAllSelected()) {
throw new IllegalStateException("Select one or more models or tick off \"all\"");
}