Project

General

Profile

Actions

Bug #2506

open

UI: add a hook to update diplomacy gold

Added by Sweet Tea Dorminy 4 days ago. Updated about 14 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
client-common
Target version:
-
Start date:
11/28/2026
Due date:
% Done:

0%

Estimated time:
(Total: 0:00 h)

Description

If I open a meeting on turn N and offer gold on turn N+1, the gold fields are still constrained to the gold on turn N, even though that might be lower or higher now.

To reproduce: open a meeting, get more gold (end the turn, or "/lua cmd edit.change_gold(find.player(0), 1000)"), then try to offer it all; the spin button stops at the old amount and that is what gets offered.

The gold spin buttons get their range from economic.gold when the dialog is built and never again; handle_player_info() refreshes other dialogs but not this one.

Attached patch adds update_diplomacy_gold(), called from handle_player_info() next to update_intel_dialog(), and the gtk3.22, gtk4 and gtk4x clients reset the spin buttons' range from it. The value-changed handler is blocked while doing so, as otherwise a fall in gold would rewrite an offered gold clause by itself.


Files


Subtasks 3 (3 open — 0 closed)

Bug #2507: UI (qt): diplomacy gold is cached from start of meetingNew11/28/2026

Actions
Bug #2508: UI (sdl): diplomacy gold is cached from start of meetingNew11/28/2026

Actions
Bug #2517: UI (gtk): diplomacy gold is cached from start of meetingNew12/02/2026

Actions
Actions

Also available in: Atom PDF