From 3eeeca34fc24c21ca9c38f95e95a5303c5b98a6e Mon Sep 17 00:00:00 2001 From: Christian Basler Date: Fri, 14 Mar 2025 16:26:24 +0100 Subject: [PATCH] Also make snapshots when removing options So we don't have situations where we can't undo a selection that occurred from removing the second last option. --- commonUI/src/commonMain/kotlin/ch/dissem/yaep/ui/common/App.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/commonUI/src/commonMain/kotlin/ch/dissem/yaep/ui/common/App.kt b/commonUI/src/commonMain/kotlin/ch/dissem/yaep/ui/common/App.kt index 3ee222f..46b68ac 100644 --- a/commonUI/src/commonMain/kotlin/ch/dissem/yaep/ui/common/App.kt +++ b/commonUI/src/commonMain/kotlin/ch/dissem/yaep/ui/common/App.kt @@ -141,6 +141,7 @@ fun PuzzleGrid( .weight(1f), options = options, onOptionRemoved = { + grid.snapshot() item.options.remove(it) row.cleanupOptions() },