mirror of
https://github.com/AndorsTrailRelease/ATCS.git
synced 2025-10-27 18:44:03 +01:00
[PR #2] [MERGED] Fix disappearing worldmap labels bug #2
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:worldmap-label-fix📝 Commits (1)
ff4d8a6Fix 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.labelsmap is keyed bynamedarea.id(corresponding tomap.area), while themapLocationsmap is keyed bymap.id. This causes worldmap labels to be marked for removal when there's anamedarea.idthat does not match anymap.id, which happens to be true for all namedareas exceptcrossglenandcrossroads.This logic is unnecessary anyway, because
WorldMapView.pushToModelis only invoked byWorldmapSegment.pushToModel, which only triggers when maps are added or moved, but not deleted. Deletions are instead handled byWorldmapSegment.elementChanged. As such, it should never be the case that a label is removable in apushToModelcall.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.