Added condition

This commit is contained in:
2026-03-07 22:45:55 +01:00
parent a846e4d7ea
commit 0597b21ac1

View File

@@ -231,7 +231,8 @@ class _CreateMatchViewState extends State<CreateMatchView> {
/// - A ruleset is selected AND
/// - Either a group is selected OR at least 2 players are selected
bool _enableCreateGameButton() {
return (selectedGroup != null || (selectedPlayers.length > 1));
return (selectedGroup != null ||
(selectedPlayers.length > 1) && selectedGameIndex != -1);
}
// If a match was provied to the view, it updates the match in the database