[PR #2] [MERGED] Fix disappearing worldmap labels bug #2

Closed
opened 2025-10-27 18:43:44 +01:00 by OMGeeky · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AndorsTrailRelease/ATCS/pull/2
Author: @atsymboldot
Created: 1/4/2021
Status: Merged
Merged: 12/26/2021
Merged by: @NutAndor

Base: masterHead: worldmap-label-fix


📝 Commits (1)

  • ff4d8a6 Fix disappearing worldmap labels bug

📊 Changes

1 file changed (+0 additions, -10 deletions)

View changed files

📝 src/com/gpl/rpg/atcontentstudio/ui/map/WorldMapView.java (+0 -10)

📄 Description

The worldmap.labels map is keyed by namedarea.id (corresponding to map.area), while the mapLocations map is keyed by map.id. This causes worldmap labels to be marked for removal when there's a namedarea.id that does not match any map.id, which happens to be true for all namedareas except crossglen and crossroads.

This logic is unnecessary anyway, because WorldMapView.pushToModel is only invoked by WorldmapSegment.pushToModel, which only triggers when maps are added or moved, but not deleted. Deletions are instead handled by WorldmapSegment.elementChanged. As such, it should never be the case that a label is removable in a pushToModel call.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AndorsTrailRelease/ATCS/pull/2 **Author:** [@atsymboldot](https://github.com/atsymboldot) **Created:** 1/4/2021 **Status:** ✅ Merged **Merged:** 12/26/2021 **Merged by:** [@NutAndor](https://github.com/NutAndor) **Base:** `master` ← **Head:** `worldmap-label-fix` --- ### 📝 Commits (1) - [`ff4d8a6`](https://github.com/AndorsTrailRelease/ATCS/commit/ff4d8a6b6ce5f389e92a7b26d33e17606ae6d51c) Fix disappearing worldmap labels bug ### 📊 Changes **1 file changed** (+0 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/com/gpl/rpg/atcontentstudio/ui/map/WorldMapView.java` (+0 -10) </details> ### 📄 Description The `worldmap.labels` map is keyed by `namedarea.id` (corresponding to `map.area`), while the `mapLocations` map is keyed by `map.id`. This causes worldmap labels to be marked for removal when there's a `namedarea.id` that does not match any `map.id`, which happens to be true for all namedareas except `crossglen `and `crossroads`. This logic is unnecessary anyway, because `WorldMapView.pushToModel` is only invoked by `WorldmapSegment.pushToModel`, which only triggers when maps are added or moved, but not deleted. Deletions are instead handled by `WorldmapSegment.elementChanged`. As such, it should never be the case that a label is removable in a `pushToModel` call. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OMGeeky added the
pull-request
label 2025-10-27 18:43:44 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: AndorsTrailRelease/archived-ATCS#2
No description provided.