Skip to content

2026-June-18 - 2026-06.16.15648

Choose a tag to compare

@github-actions github-actions released this 18 Jun 22:28
737f9c6
Fix map reloading when a technology is added (#14623)

* Fix map reloading when a technology is added

When adding a technology using edit mode, or when navigating through the game history and passing a point where a tech has been added with or without edit mode, the map will reload . On fast machines, this takes a fraction of a second. On slow machines, this might take longer. In either case, it's definitely noticeable.

Removing this line makes sure the map does not get redrawn entirely. Any changes should still be reflected on the map.

* Clarify repaint scope in inner class

Replace implicit repaint() call with explicit MapPanel.this::repaint

Inside the inner class, repaint() was previously called via a lambda:
    SwingUtilities.invokeLater(() -> repaint());

While correct, this relies on implicit scope resolution and can be ambiguous in nested class contexts.

This change makes the target explicit:
    SwingUtilities.invokeLater(MapPanel.this::repaint);

This improves readability and avoids confusion between inner class scope and the enclosing MapPanel instance.

No behavioral changes.

* Hide update behind feature flag

Hides the update behind a feature flag, so that people can safely test it for bugs.