From 43ae1ab510d57364b5d18df9e1f53f71c8950c2f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 08:42:30 +0100 Subject: [PATCH] Modern UI contract: a refused command also restores the opened line-up board Co-Authored-By: Claude Opus 5.5 --- src/modern/app/modern_session.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modern/app/modern_session.cpp b/src/modern/app/modern_session.cpp index 3c14fa2..888b4cb 100644 --- a/src/modern/app/modern_session.cpp +++ b/src/modern/app/modern_session.cpp @@ -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") {