Modern UI contract: a refused command also restores the opened line-up board

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-27 08:42:30 +01:00
1 parent 78b827a0e6
commit 43ae1ab510
1 file changed
+5 -1
+5 -1
View File
@@ -8862,7 +8862,11 @@ cli::Json ModernSession::ui_command(const cli::Json& request, uint64_t& revision
const WatcomRandom saved_rand = rand_;
const GameRandom saved_game = game_;
const uint64_t previous = revision;
const auto restore = [&] { g_ = saved_state; rand_ = saved_rand; game_ = saved_game; revision = previous; };
const int saved_entry_manager = lineup_entry_manager_, saved_entry_club = lineup_entry_club_;
const auto restore = [&] {
g_ = saved_state; rand_ = saved_rand; game_ = saved_game; revision = previous;
lineup_entry_manager_ = saved_entry_manager, lineup_entry_club_ = saved_entry_club; // the board stays as it was
};
cli::Json answer;
std::string error;
if (kind == "camp.book") {