deselect cards when placing cards fails

dev
LeRoyce Pearson 2024-07-25 22:52:53 -06:00
parent 42c18ebdfc
commit 1189682bfa
1 changed files with 2 additions and 0 deletions

View File

@ -582,6 +582,8 @@ pub fn doSelectOrPlace(pressed: bool) !void {
new_snapshot.selected_card = null; new_snapshot.selected_card = null;
try history.append(seizer.platform.allocator(), new_snapshot); try history.append(seizer.platform.allocator(), new_snapshot);
hovered_card = @intCast(indexOfTopOfStack(new_snapshot.getDeck(hovered_deck.?))); hovered_card = @intCast(indexOfTopOfStack(new_snapshot.getDeck(hovered_deck.?)));
} else {
snapshot.selected_card = null;
} }
} }
} }