reset rando context if current seed is deleted

This commit is contained in:
gymnast86
2026-06-26 11:53:33 -07:00
parent f62a70f9d0
commit 1b3b493fbf
+5 -1
View File
@@ -689,7 +689,11 @@ void delete_seed_callback(Pane& pane) {
return !playerIsOnTitleScreen() || hash.ends_with(')');
}
})
.on_pressed([entry, &pane] {
.on_pressed([entry, &pane, hash] {
// If the currently selected seed is deleted, reset the context
if (randomizer_GetContext().mHash == hash) {
randomizer_GetContext() = RandomizerContext{};
}
std::filesystem::remove_all(entry);
delete_seed_callback(pane);
});